public async Task Execute() { try { await ExecuteInternal(); } finally { JsonLogger.WriteScenario(this); TestMap.StoppedEarly.TryRemove(_testDetails.GetGuid(), out _); } }
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 _); } }