Mercurial > pub > ImplabNet
diff Implab.Test/RunnableComponentTests.cs @ 196:40d7fed4a09e
fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.
| author | cin | 
|---|---|
| date | Mon, 29 Aug 2016 23:15:51 +0300 | 
| parents | 3071220371f8 | 
| children | 4d9830a9bbb8 | 
line wrap: on
 line diff
--- a/Implab.Test/RunnableComponentTests.cs Fri Apr 22 13:13:08 2016 +0300 +++ b/Implab.Test/RunnableComponentTests.cs Mon Aug 29 23:15:51 2016 +0300 @@ -132,7 +132,7 @@ ShouldThrow(() => p.Join(1000)); Assert.AreEqual(ExecutionState.Failed, comp.State); - Assert.IsInstanceOfType(comp.LastError, typeof(OperationCanceledException)); + Assert.IsTrue(comp.LastError is OperationCanceledException); comp.Dispose(); } @@ -185,7 +185,7 @@ p.Cancel(); ShouldThrow(() => p.Join(1000)); Assert.AreEqual(ExecutionState.Failed, comp.State); - Assert.IsInstanceOfType(comp.LastError, typeof(OperationCanceledException)); + Assert.IsTrue(comp.LastError is OperationCanceledException); comp.Dispose(); }
