Assert.AreEqual vs Assert.IsTrue/Assert.IsFalse

You should only use Assert.IsTrue if you're testing something which directly returns a boolean that should always be true.

You should not massage data to get a boolean for IsTrue; instead, you should call a more relevant method in Assert or CollectionAssert.

In your edited example, you should by all means call Assert.AreEqual instead; it will give you a much nicer message.


Using Assert.IsTrue is clearer and less verbose.