public void TestTimeoutNotElapsed() { TimeoutTestCaseFixture fixture = new TimeoutTestCaseFixture(); TestSuite suite = TestBuilder.MakeFixture(fixture); TestMethod testMethod = (TestMethod)TestFinder.Find("TestTimeOutNotElapsed", suite, false); ITestResult result = TestBuilder.RunTest(testMethod, fixture); Assert.That(result.ResultState, Is.EqualTo(ResultState.Success)); }
public void TestTimeoutElapsed() { TimeoutTestCaseFixture fixture = new TimeoutTestCaseFixture(); TestSuite suite = TestBuilder.MakeFixture(fixture); TestMethod testMethod = (TestMethod)TestFinder.Find("TestTimeOutElapsed", suite, false); ITestResult result = TestBuilder.RunTest(testMethod, fixture); Assert.That(result.ResultState, Is.EqualTo(ResultState.Failure)); Assert.That(result.Message, Does.Contain("100ms")); }
public void TestTimeOutTestCaseWithOutElapsed() { TimeoutTestCaseFixture fixture = new TimeoutTestCaseFixture(); TestSuite suite = TestBuilder.MakeFixture(fixture); ParameterizedMethodSuite methodSuite = (ParameterizedMethodSuite)TestFinder.Find("TestTimeOutTestCase", suite, false); ITestResult result = TestBuilder.RunTest(methodSuite, fixture); Assert.That(result.ResultState, Is.EqualTo(ResultState.Failure), "Suite result"); Assert.That(result.Children.ToArray()[0].ResultState, Is.EqualTo(ResultState.Success), "First test"); Assert.That(result.Children.ToArray()[1].ResultState, Is.EqualTo(ResultState.Failure), "Second test"); }
public void TestTimeOutTestCaseWithOutElapsed() { TimeoutTestCaseFixture fixture = new TimeoutTestCaseFixture(); TestSuite suite = TestBuilder.MakeFixture(fixture); ParameterizedMethodSuite testMethod = (ParameterizedMethodSuite)TestFinder.Find("TestTimeOutTestCase", suite, false); ITestResult result = TestBuilder.RunTest(testMethod, fixture); Assert.That(result.ResultState, Is.EqualTo(ResultState.Cancelled)); Assert.That(result.Children[0].ResultState, Is.EqualTo(ResultState.Success)); Assert.That(result.Children[1].ResultState, Is.EqualTo(ResultState.Failure)); }