For example the Equals method. a
should equal b
and b
should equal a
. Would you say it is OK to check this in one test case using two asserts like the following:
[Test]
public void Equals_TwoEqualObjects_ReturnsTrue()
{
var a = new Something();
var b = new Something();
Assert.That(a.Equals(b), Is.True);
Assert.That(b.Equals(a), Is.True);
}
Or do you think this should be done in two separate tests so that you won't have two asserts in the test?
I'm thinking having two asserts in this case may be cleaner, because I am not sure what I would call the two separate tests, and I am kind of thinking it doesn't matter which one of the asserts that break the test. But anyways, I am curious to know what others think about this since I am kind of a newbie in this area :)