public void Teardown()
        {
            var testStatus = TestContext.CurrentContext.Result.Outcome.Status;

            // ReSharper disable once SwitchStatementMissingSomeCases
            switch (testStatus)
            {
            case TestStatus.Failed:
            case TestStatus.Inconclusive:
            case TestStatus.Warning:
                Runner.TakeAndSaveScreenshot(TestContext.CurrentContext.Test.Name);
                break;
            }

            Runner.Cleanup();
        }
Exemplo n.º 2
0
        public void Teardown()
        {
            var testStatus = TestContext.CurrentContext.Result.Outcome.Status;

            // ReSharper disable once SwitchStatementMissingSomeCases
            switch (testStatus)
            {
            case TestStatus.Passed:
                Console.WriteLine("Good Job!");
                break;

            default:
                Runner.TakeAndSaveScreenshot(Configuration, TestContext.CurrentContext.Test.Name);
                break;
            }

            Runner.Cleanup();
        }