public void AsynchronousTestMayHaveTimeoutSpecified()
        {
            AsynchronousFixture fixture = new AsynchronousFixture();
            ITestResult result = TestBuilder.RunTestCase(fixture, "AsynchronousTestWithTimeout");

            Assert.That(result.ResultState, Is.EqualTo(ResultState.Failure));
            Assert.That(result.Message, Contains.Substring("5ms"));
        }
        public void AsynchronousTestReturnsBeforeTestIsComplete()
        {
            AsynchronousFixture fixture = new AsynchronousFixture();
            WorkItem wi = TestBuilder.RunTestCaseAsync(fixture, "AsynchronousTest");

            Assert.That(wi.State, Is.Not.EqualTo(WorkItemState.Complete));

            fixture.Quit = true;
            while (wi.State != WorkItemState.Complete)
                Thread.Sleep(2);

            Assert.That(wi.Result.ResultState, Is.EqualTo(ResultState.Success));
        }