开发者

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

开发者 https://www.devze.com 2023-02-22 08:58 出处:网络
What is the difference between the two methods isSameAs() and isEqualTo() ? The documentati开发者_如何学编程on says:

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

The documentati开发者_如何学编程on 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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号