[JUnit] assertEqual vs assertSame

Found a good explanation on Stackoverflow about this 

http://stackoverflow.com/questions/2882337/junit-assertsame

Actually this is for assertSame, but we can differentiate assertEqual from this easily.

So, for short words, assertSame works on reference objects and assertEqual for equality of values between objects. 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: