How to test int equality with ShouldBe

Viewed 3098

I am running c# tests using ShouldBe and I have this code:

int x = 3;
int y = 3;
x.ShouldBeSameAs(y);

Problem is it throws exception:

An exception of type 'Shouldly.ShouldAssertException' occurred in Shouldly.dll but was not handled in user code

Additional information: x

should be same as

3

but was

3

How can I test equality of to integers with ShouldBe?

2 Answers
Related