diff Implab.Test/AsyncTests.cs @ 73:3b8393be3441 v2

fixed tests
author cin
date Fri, 05 Sep 2014 00:27:14 +0400
parents dabf79fde388
children c761fc982e1d
line wrap: on
line diff
--- a/Implab.Test/AsyncTests.cs	Thu Sep 04 18:47:12 2014 +0400
+++ b/Implab.Test/AsyncTests.cs	Fri Sep 05 00:27:14 2014 +0400
@@ -23,7 +23,13 @@
             Exception err = null;
 
             var p = new Promise<int>();
-            p.Then(x => res = x, e => err = e);
+            p.Then(
+                x => res = x,
+                e => {
+                    err = e;
+                    return -2;
+                }
+            );
             p.Reject(new ApplicationException("error"));
 
             Assert.AreEqual(res, -1);
@@ -354,7 +360,7 @@
         [TestMethod]
         public void ChainedCancel2Test() {
             // при отмене цепочки обещаний, вложенные операции также должны отменяться
-            IPromiseBase p = null;
+            IPromise p = null;
             var pSurvive = new Promise<bool>();
             var hemStarted = new ManualResetEvent(false);
             p = PromiseHelper