Пример #1
0
 public void Recover_on_Failure_does_call_closure()
 {
     var t = new Failure<string>(new Exception());
     Exception e = null;
     Func<Exception, string> c = ex => {
         e = ex;
         return "bar";
     };
     Assert.AreEqual("bar", t.Recover(c).Value);
     Assert.AreSame(t.Exception, e);
 }