Mercurial > pub > ImplabNet
comparison Implab.Test/AsyncTests.cs @ 105:4d308952fd5e v2
minor fixes
author | cin |
---|---|
date | Mon, 10 Nov 2014 10:17:54 +0300 |
parents | 2c5631b43c7d |
children | d4e38929ce36 |
comparison
equal
deleted
inserted
replaced
104:5f10d54b45df | 105:4d308952fd5e |
---|---|
134 }); | 134 }); |
135 | 135 |
136 p1.Resolve(100); | 136 p1.Resolve(100); |
137 | 137 |
138 Assert.AreEqual(p3.Join(), "100"); | 138 Assert.AreEqual(p3.Join(), "100"); |
139 } | |
140 | |
141 [TestMethod] | |
142 public void ChainFailTest() { | |
143 var p1 = new Promise<int>(); | |
144 | |
145 var p3 = p1.Chain(x => { | |
146 var p2 = new Promise<string>(); | |
147 p2.Reject(new Exception("DIE!!!")); | |
148 return p2; | |
149 }); | |
150 | |
151 p1.Resolve(100); | |
152 | |
153 Assert.IsTrue(p3.IsResolved); | |
139 } | 154 } |
140 | 155 |
141 [TestMethod] | 156 [TestMethod] |
142 public void PoolTest() { | 157 public void PoolTest() { |
143 var pid = Thread.CurrentThread.ManagedThreadId; | 158 var pid = Thread.CurrentThread.ManagedThreadId; |