예제 #1
0
        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"));
        }
예제 #2
0
        public void FailWhenNotNull()
        {
            AssertAll.IsNull(1);

            Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute());
        }
예제 #3
0
 public void PassWhenNull()
 {
     AssertAll.IsNull(null);
     AssertAll.Execute();
 }