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

Simplify assertions

    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

            People

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

              Dates

                Created:
                Updated:
                Resolved: