If you're using assertSame(Object, Object), then the assertion will fail if the two objects are different objects on the heap, even if they are both Longs that have the same longValue(), or more generally, the same toString() output, which is what JUnit shows you between the angle brackets <>.
Hope this helps? Andrew -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 1 December 2004 10:53 AM To: [EMAIL PROTECTED] Subject: Errors that don't make sense... I keep running my tests, and keep getting failures like this: expected:<987654321> but was:<987654321> junit.framework.AssertionFailedError: expected:<987654321> but was:<987654321> at com.wf.bd.ice.business.BusinessValidatorFormTest.testSetGetBankAccount_1(Bus inessValidatorFormTest.java:670) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) This does not make sense as the 2 values are java.lang.Long()'s and match as stated above.... -------------------- Mick Knutson Wells Fargo Business Direct Information Systems (415) 222-1020 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
