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

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