Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4738

Clean test cases by refactoring assertFalse(equals()) with assertNotEquals

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      I am working on research that investigates test smell refactoring in which we identify alternative implementations of test cases, study how commonly used these refactorings are, and assess how acceptable they are in practice.

      This smell occurs when inappropriate assertions are used, while there exist better alternatives. For example,  assertFalse(x.equals( y )); can be refactored using assertNotEquals(x, y);.

      I would like to get your feedback on this particular test smell and its refactoring. Thanks in advance for your input.

      Attachments

        Issue Links

          Activity

            People

              tison Zili Chen
              taher-ghaleb Taher Ghaleb
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h