Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-9952

Simplify assertions

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Done
    • None
    • 2.0.0
    • test
    • None

    Description

      Assertions in the form:

      assertTrue(<x> == <y>)
      assertEquals(null, <x>) or assertTrue(<x> == null)
      assertTrue(<x> != null)
      assertEquals(<boolean>, <x>)
      

      can be simplified to:

      assertEquals(<x>, <y>)
      assertNull(<x>)
      assertNotNull(<x>)
      assertTrue/assertFalse(<x>)
      

      Not only are these simpler, some of them also provide more information in case of failure.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            adoroszlai Attila Doroszlai Assign to me
            adoroszlai Attila Doroszlai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment