public void FailWhenThereAreFailures() { AssertAll.IsFalse(false); AssertAll.Inconclusive(); AssertAll.Fail(); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }
public void ThrowAssertInconclusiveExceptionWhenInconclusive() { AssertAll.IsFalse(false); AssertAll.AreEqual(1, 1); AssertAll.Inconclusive(); Assert.ThrowsException <AssertAllInconclusiveException>(() => AssertAll.Execute()); }
public void PassWhenThereAreNoExceptionsOrInconclusives() { AssertAll.IsFalse(false); AssertAll.AreEqual(1, 1); AssertAll.IsInstanceOfType(1, typeof(int)); AssertAll.Execute(); }
public void ModifyStackTraceOfException() { AssertAll.AreEqual(1, 2); AssertAll.IsFalse(true); AssertAll.IsNull(1); var thrownException = Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); Assert.IsTrue(thrownException.StackTrace.ToLower().Contains("line 66"), thrownException.StackTrace); Assert.IsTrue(thrownException.StackTrace.ToLower().Contains("line 67")); Assert.IsTrue(thrownException.StackTrace.ToLower().Contains("line 68")); }
public void FailWhenTrue() { AssertAll.IsFalse(true, "1 and 2 are the same"); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }
public void PassWhenFalse() { AssertAll.IsFalse(1 == 2, "1 and 2 are not the same"); AssertAll.Execute(); }