Exemple #1
0
        protected override async Task BeforeTestClassFinishedAsync()
        {
            await base.BeforeTestClassFinishedAsync();

            if (_scenario != null)
            {
                _report.Report(_scenario);
            }
        }
Exemple #2
0
 private async Task VerifyAndReportScenario(Scenario scenario, string name)
 {
     try
     {
         await scenario.SafeVerify(name);
     }
     finally
     {
         _report.Report(scenario);
     }
 }
 private void VerifyAndReportScenario(ScenarioRunResult result, string name, string grouping)
 {
     if (_scenarioRunner != null)
     {
         throw new InvalidOperationException(Constants.Errors.DontReturnScenarioResults);
     }
     result.Scope    = name;
     result.Grouping = result.Grouping ?? grouping;
     _report.Report(result);
     result.ThrowIfErrored();
 }
Exemple #4
0
        internal async Task Complete(ScenarioReport report)
        {
            await ExecuteWithoutThrowing();

            if (report == null)
            {
                Trace.WriteLine($"no report found, check that the test assembly has been set in the assembly: \r\n\t[assembly: TestFramework(Xunit.ScenarioReporting.Constants.Framework, Xunit.ScenarioReporting.Constants.AssemblyName)] ");
            }
            report?.Report(_result);
            _result.ThrowIfErrored();
        }