diff Implab.Test/AsyncTests.cs @ 11:6ec82bf68c8e promises

refactoring
author cin
date Tue, 05 Nov 2013 01:09:58 +0400
parents aa33d0bb8c0c
children b0feb5b9ad1c
line wrap: on
line diff
--- a/Implab.Test/AsyncTests.cs	Sun Nov 03 18:07:38 2013 +0400
+++ b/Implab.Test/AsyncTests.cs	Tue Nov 05 01:09:58 2013 +0400
@@ -2,6 +2,7 @@
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 using System.Reflection;
 using System.Threading;
+using Implab.Parallels;
 
 namespace Implab.Test
 {
@@ -70,6 +71,17 @@
 		}
 
         [TestMethod]
+        public void FixErrorTest() {
+            var p = new Promise<int>();
+
+            var p2 = p.Error(e => 101);
+
+            p.Reject(new Exception());
+
+            Assert.AreEqual(p2.Join(), 101);
+        }
+
+        [TestMethod]
 		public void ChainTest ()
 		{
 			var p1 = new Promise<int> ();