示例#1
0
文件: TestMonad.cs 项目: rayark/mast
        public void MonadCompletionSourceErrorTest()
        {
            var mcs = new MonadCompletionSource <int>();
            var m   = mcs.Monad;

            _MonadCompletionSourceTestTask2(mcs);
            _Wait(m);
            Assert.AreEqual(typeof(ArgumentException), m.Error.GetType());
        }
示例#2
0
文件: TestMonad.cs 项目: rayark/mast
        public void MonadCompletionSourceTest()
        {
            var mcs = new MonadCompletionSource <int>();
            var m   = mcs.Monad;

            _MonadCompletionSourceTestTask1(mcs);
            _Wait(m);
            Assert.AreEqual(3, m.Result);
        }