public void FailWhenThereAreFailures() { AssertAll.IsFalse(false); AssertAll.Inconclusive(); AssertAll.Fail(); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }
internal static void TestMethod(this AssertAll source, bool passes) { if (passes == false) { AssertAll.Fail(); } }
public void AllFailureAndInconclusiveMessagesAreIncluded() { var message1 = RandomValue.String(); var message2 = RandomValue.String(); var message3 = RandomValue.String(); AssertAll.IsTrue(true, message1); AssertAll.Fail(message2); AssertAll.Inconclusive(message3); try { AssertAll.Execute(); } catch (Exception e) { var message = e.Message; Assert.IsFalse(message.Contains(message1)); Assert.IsTrue(message.Contains(message2)); Assert.IsTrue(message.Contains(message3)); } }
public void Fail() { AssertAll.Fail(); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }
public void ShowAllTheAssertExceptions() { AssertAll.Fail("we'll see the rest in the test results"); AssertAll.IsTrue(false); AssertAll.AreEqual(1, 2); }