예제 #1
0
파일: TryTests.cs 프로젝트: sdether/Scando
 public void RecoverWith_on_Failure_does_call_closure()
 {
     var t = new Failure<string>(new Exception());
     Exception e = null;
     Func<Exception, Try<string>> c = ex => {
         e = ex;
         return new Success<string>("bar");
     };
     Assert.AreEqual("bar", t.RecoverWith(c).Value);
     Assert.AreSame(t.Exception, e);
 }