Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

JUnit: assertNotEquals

Options
  • 27-08-2002 6:05pm
    #1
    Registered Users Posts: 21,264 ✭✭✭✭


    Maybe I'm going crazy but I could of sworn there was a assertNotEquals in JUnit? I can't see in the javadoc for 3.7 or 3.8


Comments

  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    I thought so too, but a quick web check reveals that Mr Gamma never seems to have included this method.

    There are a number of testing frameworks which are extensions of JUnit which support it though. Google for "assertNotEquals JUnit" and you should find them.

    Alternately, you can use something like :

    assertTrue(! object1.equals(object2));

    only thats a bit ugly and useless :)

    jc


Advertisement