Tutorial by Examples

Assert.That(actual, Is.EqualTo(expected));
Large fluent assertions do become harder to read, but when combined with classes that have good implementations of ToString(), they can generate very useful error messages. [Test] public void AdvancedContraintsGiveUsefulErrorMessages() { Assert.That(actualCollection, Has .Count.Equa...
var a = new List<int> { 1, 2 }; var b = new List<int> { 2, 1 }; Assert.That (a, Is.EqualTo(b)); // fails Assert.That (a, Is.EquivalentTo(b)); // succeeds

Page 1 of 1