Exemplo n.º 1
0
 public void RecoverWith_on_Success_does_not_call_closure()
 {
     var t = new Success<string>("foo");
     Exception e = null;
     Func<Exception, Try<string>> c = ex => {
         e = ex;
         return new Success<string>("bar");
     };
     Assert.AreEqual("foo", t.RecoverWith(c).Value);
     Assert.IsNull(e);
 }