예제 #1
0
 public async Task Execute()
 {
     try
     {
         await ExecuteInternal();
     }
     finally
     {
         JsonLogger.WriteScenario(this);
         TestMap.StoppedEarly.TryRemove(_testDetails.GetGuid(), out _);
     }
 }
예제 #2
0
        internal Scenario(List <Step> steps, TestDetails testDetails)
        {
            TestMap.NotRun.TryRemove(testDetails.GetGuid(), out _);
            TestMap.StoppedEarly.TryAdd(testDetails.GetGuid(), this);

            StoryText    = testDetails.StoryText;
            ScenarioText = testDetails.ScenarioText;

            _reporters = new Reporters.Reporters();
            Steps      = steps;

            try
            {
                Execute();
            }
            finally
            {
                JsonLogger.WriteScenario(this);
                TestMap.StoppedEarly.TryRemove(testDetails.GetGuid(), out _);
            }
        }