diff Implab.Test/AsyncTests.cs @ 145:706fccb85524 v2

RC: cancellation support for promises + tests
author cin
date Sun, 08 Mar 2015 02:52:27 +0300
parents f75cfa58e3d4
children eb793fbbe4ea
line wrap: on
line diff
--- a/Implab.Test/AsyncTests.cs	Fri Mar 06 15:45:26 2015 +0300
+++ b/Implab.Test/AsyncTests.cs	Sun Mar 08 02:52:27 2015 +0300
@@ -7,7 +7,7 @@
 
 using NUnit.Framework;
 using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
-using TestMethod = NUnit.Framework.TestAttribute;
+using TestMethodAttribute = NUnit.Framework.TestAttribute;
 
 #else
 
@@ -51,7 +51,7 @@
         [TestMethod]
         public void CancelExceptionTest() {
             var p = new Promise<bool>();
-            p.Cancel();
+            p.CancelOperation(null);
 
             var p2 = p.Then(x => x, null, reason => {
                 throw new ApplicationException("CANCELLED"); 
@@ -69,10 +69,10 @@
         [TestMethod]
         public void ContinueOnCancelTest() {
             var p = new Promise<bool>();
-            p.Cancel();
+            p.CancelOperation(null);
 
             var p2 = p
-                .Then<bool>(x => x, null, reason => {
+                .Then(x => x, null, reason => {
                     throw new ApplicationException("CANCELLED");
                 })
                 .Then(x => x, e => true);