Exemple #1
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;

            _testDetails = testDetails;

            FileName = testDetails.CallerFile;

            Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

            _reporters = new Reporters.Reporters();
            Steps      = steps;
        }
Exemple #2
0
 public async Task Execute()
 {
     try
     {
         await ExecuteInternal();
     }
     finally
     {
         JsonLogger.WriteScenario(this);
         TestMap.StoppedEarly.TryRemove(_testDetails.GetGuid(), out _);
     }
 }
Exemple #3
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 _);
            }
        }