Exemplo n.º 1
0
        [Test] public void SubmitCopiesContextBeforeExecutesCallable()
        {
            IContextCarrier cc = SetupContextCarrier();

            _callable.Stub(x => x.Call()).Return(TestData <T> .Two);
            var future = _sut.Submit(_callable);

            Assert.IsTrue(future.IsDone);
            Assert.That(future.GetResult(), Is.EqualTo(TestData <T> .Two));

            Mockery.Assert(cc.ActivityOf(x => x.Restore()) < _callable.ActivityOf(x => x.Call()));
        }