Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between isSameAs() and isEqualTo() in FEST?

Tags:

fest

What is the difference between the two methods isSameAs() and isEqualTo() ?

The documentation says:

Verifies that the actual value is equal to the given one.

and

Verifies that the actual value is the same as the given one.

(http://fest.easytesting.org/assert/apidocs/index.html)

/Roger

like image 973
Roger C S Wernersson Avatar asked Apr 04 '11 07:04

Roger C S Wernersson


1 Answers

I could give you answer just from my general understanding.

isSameAs - checks if objects are same (e.g. checking if objects point to same reference)

isEqualTo - checks if objects are equal (e.g. checking if objects are equal based on value)

Hope it helps a bit

like image 151
Aurimas Neverauskas Avatar answered Oct 02 '22 00:10

Aurimas Neverauskas