Re: [junit] AssertNotEquals
- View SourceI agree, I though I sent a message in regards to AssertNotEquals versus
the AssertNotSame. I think that AssertNotSame should perform the
if (objOne == objTwo) fail(message)
and the AssertNotEquals
if objOne.equals(objTwo) fail(message)
How would I go about submitting the code for approval?
I would not mind writing the converse of all of the assertXXX() in the
David Corbin wrote:
> I agree that AssertNotEquals should exist, but it should be implemented
> in such a way that your example would be "very bad". It should in fact
> be implemented by calling the equals() method, not by comparing
> Michael Forsberg wrote:
> > Could someone inform me why there is not an AssertNotEquals(...) method
> > in the junit.framework.Assert class.
> > While coding a test for a copy constructor I noticed the lack of this
> > method. I think that the ability to a assert that a Copy constructor
> > does not return a new reference to the same object.
> > I understand this could be accomplished via the code...
> > if (objOne = objTwo) fail(message);
> > but feel the JUnit Classes would benefit from this addition. I would be
> > glad to discuss this topic and/or write the actual method if and/or when
> > it is approved.
> > Big Mike
> > To unsubscribe from this group, send an email to:
> > email@example.com
> David Corbin
> Mach Turtle Technologies, Inc.
> To unsubscribe from this group, send an email to: