public void ThrowAssertInconclusiveExceptionWhenInconclusive() { AssertAll.IsFalse(false); AssertAll.AreEqual(1, 1); AssertAll.Inconclusive(); Assert.ThrowsException <AssertAllInconclusiveException>(() => AssertAll.Execute()); }
public void FailWhenThereAreFailures() { AssertAll.IsFalse(false); AssertAll.Inconclusive(); AssertAll.Fail(); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }
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 ThrowAssertInconclusiveException() { AssertAll.Inconclusive("the test is inconclusive"); Assert.ThrowsException <AssertAllInconclusiveException>(() => AssertAll.Execute()); }