public void InstancePerTestCaseFullLifeCycleTest() { BaseLifeCycle.Reset(); var fixture = TestBuilder.MakeFixture(typeof(FullLifecycleTestCase)); var attr = new FixtureLifeCycleAttribute(LifeCycle.InstancePerTestCase); attr.ApplyToTest(fixture); ITestResult result = TestBuilder.RunTest(fixture); Assert.That(result.ResultState.Status, Is.EqualTo(TestStatus.Passed), result.Message); BaseLifeCycle.VerifyInstancePerTestCase(3); }
public void SingleInstanceFullLifeCycleTest() { BaseLifeCycle.Reset(); var fixture = TestBuilder.MakeFixture(typeof(FullLifecycleTestCase)); var attr = new FixtureLifeCycleAttribute(LifeCycle.SingleInstance); attr.ApplyToTest(fixture); ITestResult result = TestBuilder.RunTest(fixture); Assert.That( result.Children.Select(t => t.ResultState), Is.EquivalentTo(new[] { ResultState.Success, ResultState.Failure, ResultState.Failure })); BaseLifeCycle.VerifySingleInstance(3); }
public void SetUp() { BaseLifeCycle.Reset(); }