static TestBase() { App = new TestApp(); App.Start(); TestLifetimePublisher.CreateTestSuiteContext(); RegisterExceptionHandler(); }
public void Dispose() { TestLifetimePublisher.EndTestSuiteContextExecution(); TestLifetimePublisher.DisposeTestSuiteContext(); App.Stop(); GC.SuppressFinalize(this); }
private static TestContextStepPart StartTestContextStepPartExecution(MethodInfo methodInfo, IEnumerable <object> parameters) { var step = TestSuiteContext.Instance.TestContexts.Last().TestContextSteps.Last(); var tcsp = TestLifetimePublisher.CreateTestContextStepPart(step, methodInfo, parameters); TestLifetimePublisher.BeforeStartTestContextStepPartExecution(tcsp); TestLifetimePublisher.StartTestContextStepPartExecution(tcsp); return(tcsp); }
private TestContextStep StartTestContextStepExecution(string testStepName, object[] parameters, MethodInfo methodInfo) { var testContext = TestSuiteContext.Instance.TestContexts.Last(); Guard.NotNull(testContext); var tc = TestLifetimePublisher.CreateTestContextStep(testContext, parameters, methodInfo); TestLifetimePublisher.BeforeStartTestContextStepExecution(tc); TestLifetimePublisher.StartTestContextStepExecution(tc); return(tc); }
private static TestContext StartTestExecution(MethodInfo methodInfo, IEnumerable <object> parameters) { var testSuiteContext = TestSuiteContext.Instance; if (testSuiteContext.ExecutionStartedOnUtc == default(DateTime)) { TestLifetimePublisher.BeforeTestSuiteContextExecution(); TestLifetimePublisher.StartTestSuiteContextExecution(); } //TODO: get test tags (categories) using methodInfo var tc = TestLifetimePublisher.CreateTestContext(methodInfo, parameters, null, testSuiteContext); TestLifetimePublisher.BeforeStartTestContextExecution(tc); TestLifetimePublisher.StartTestContextExecution(tc); return(tc); }
private void EndTestContextStepPartExecution(TestContextStepPart stepPart) { TestLifetimePublisher.EndTestContextStepPartExecution(stepPart); TestLifetimePublisher.DisposeTestContextStepPart(stepPart); }
private static void EndTestContextExecution(TestContext testContext) { TestLifetimePublisher.EndTestContextExecution(testContext); TestLifetimePublisher.DisposeTestContext(testContext); }
private void EndTestContextStepExecution(TestContextStep step) { TestLifetimePublisher.EndTestContextStepExecution(step); TestLifetimePublisher.DisposeTestContextStep(step); }