コード例 #1
0
 public void ShouldPass()
 {
     AssertAction.Throws <Exception>(() => { throw new Exception(); });
 }
コード例 #2
0
 public void ShouldFail()
 {
     AssertAction.Throws <ArgumentException>(() => { throw new Exception(); });
 }
コード例 #3
0
 public void ShouldFailByPredicate()
 {
     AssertAction.Throws <Exception>(() => { throw new Exception(); }, e => e.InnerException != null);
 }
コード例 #4
0
        public void ShouldPassWithPredicate()
        {
            var message = "message";

            AssertAction.Throws <Exception>(() => { throw new Exception(message); }, e => e.Message == message);
        }