public void TestSequenceEqualCustomMessage() { var expected = new int[] { 0 }; var actual = new int[] { 1 }; var verifier = new NUnitVerifier(); var exception = Assert.Throws <AssertionException>(() => verifier.SequenceEqual(expected, actual, message: "Custom message")); verifier.EqualOrDiff($"Custom message", exception.Message); }
public void TestSequenceEqualCustomMessageWithContext() { var expected = new int[] { 0 }; var actual = new int[] { 1 }; var verifier = new NUnitVerifier().PushContext("Known Context"); var exception = Assert.Throws <AssertionException>(() => verifier.SequenceEqual(expected, actual, message: "Custom message")); verifier.EqualOrDiff($"Context: Known Context{Environment.NewLine}Custom message", exception.Message); }
public void TestSequenceEqualMessage() { var expected = new int[] { 0 }; var actual = new int[] { 1 }; var verifier = new NUnitVerifier(); var exception = Assert.Throws <AssertionException>(() => verifier.SequenceEqual(expected, actual)); verifier.EqualOrDiff(string.Empty, exception.Message); }