Example #1
0
        [Test] public void SubmitExecutesTheCallableAndSetFutureResult()
        {
            _callable.Stub(c => c.Call()).Return(TestData <T> .Two);

            var future = _sut.Submit(_callable);

            Assert.IsTrue(future.IsDone);
            Assert.That(future.GetResult(), Is.EqualTo(TestData <T> .Two));
            _sut.AssertWasCalled(x => x.Execute(Arg <IRunnable> .Is.NotNull))
            .Before(_callable.AssertWasCalled(c => c.Call()));
        }