Help assert VALUES of the objects
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rajesh_S
Posted On:   Monday, February 27, 2006 02:12 AM

Hi,

I wish to compare 2 objects. Not the references, but the values of the objects.


assertEquals(expectedReturn, actualReturn) compares only the reference and not the values as said in the API.


When I made the actualReturn = expectedReturn, the test passed on peacefully.


How to 2 different objects of same class whose members have the same values?


Thanks in advance,


Rajesh


Re: Help assert VALUES of the objects

Posted By:   ankush_purwar  
Posted On:   Monday, February 27, 2006 02:01 PM

Override equals() methods of java.lang.Object
About | Sitemap | Contact