Пример #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);
        }