Exemple #1
0
 static TestBase()
 {
     App = new TestApp();
     App.Start();
     TestLifetimePublisher.CreateTestSuiteContext();
     RegisterExceptionHandler();
 }
Exemple #2
0
        public void Dispose()
        {
            TestLifetimePublisher.EndTestSuiteContextExecution();
            TestLifetimePublisher.DisposeTestSuiteContext();

            App.Stop();
            GC.SuppressFinalize(this);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
 private void EndTestContextStepPartExecution(TestContextStepPart stepPart)
 {
     TestLifetimePublisher.EndTestContextStepPartExecution(stepPart);
     TestLifetimePublisher.DisposeTestContextStepPart(stepPart);
 }
Exemple #7
0
 private static void EndTestContextExecution(TestContext testContext)
 {
     TestLifetimePublisher.EndTestContextExecution(testContext);
     TestLifetimePublisher.DisposeTestContext(testContext);
 }
Exemple #8
0
 private void EndTestContextStepExecution(TestContextStep step)
 {
     TestLifetimePublisher.EndTestContextStepExecution(step);
     TestLifetimePublisher.DisposeTestContextStep(step);
 }