Exemple #1
0
        IScenario CreateScenario(IMethodInfo method, Test suite)
        {
            var integration = integrationReader.GetIntegration(method);
            var adapter     = new ScenarioAdapter(suite, method, integration);

            return(adapter.CreateScenario());
        }
Exemple #2
0
        /// <summary>
        /// Performs actions after each test.
        /// </summary>
        /// <param name="test">Test.</param>
        public void AfterTest(ITest test)
        {
            var scenario    = ScenarioAdapter.GetScenario(test);
            var outcome     = GetOutcome(test);
            var integration = integrationReader.GetIntegration(test);

            integration.AfterScenario(scenario, outcome);
        }
Exemple #3
0
        /// <summary>
        /// Performs actions before each test.
        /// </summary>
        /// <param name="test">Test.</param>
        public void BeforeTest(ITest test)
        {
            var scenario = ScenarioAdapter.GetScenario(test);

            test.Properties.Add(ScenarioAdapter.ScreenplayScenarioKey, scenario);
            var integration = integrationReader.GetIntegration(test);

            integration.BeforeScenario(scenario);
        }
Exemple #4
0
        bool?GetOutcome(ITest test)
        {
            var success = ScenarioAdapter.GetSuccess(test);
            var failure = ScenarioAdapter.GetFailure(test);

            if (success)
            {
                return(true);
            }
            if (failure)
            {
                return(false);
            }

            return(null);
        }