private void AddScenarioElement(IProject project, UnitTestElementConsumer consumer,
     StorEvilStoryElement storyElement, IScenario scenario)
 {
     if (scenario is Scenario)
         consumer(new StorEvilScenarioElement(_provider, storyElement, project, scenario.Name, (Scenario)scenario));
     else
         consumer(new StorEvilScenarioOutlineElement(_provider, storyElement, project, scenario.Name,
                                                     (ScenarioOutline)scenario));
 }
Example #2
0
 public bool Equals(StorEvilStoryElement other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(base.Equals(other) && Equals(other._namespace, _namespace) && Equals(other.Id, Id));
 }
 private void AddScenarioElement(IProject project, UnitTestElementConsumer consumer,
     StorEvilStoryElement storyElement, IScenario scenario)
 {
     if (scenario is Scenario)
         consumer(new StorEvilScenarioElement(_provider, storyElement, project, scenario.Name, (Scenario)scenario));
     else
     {
         var outline = (ScenarioOutline) scenario;
         var outlineElement = new StorEvilScenarioOutlineElement(_provider, storyElement, project, scenario.Name,
                                                                                 outline);
         consumer(outlineElement);
         var i = 0;
         foreach (var child in new ScenarioPreprocessor().Preprocess(scenario))
         {
             consumer(new StorEvilScenarioElement(_provider, outlineElement, project, BuildExampleRowScenarioName(outline, i), child));
             i++;
         }
     }
 }
 public bool Equals(StorEvilStoryElement other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return base.Equals(other) && Equals(other._namespace, _namespace) && Equals(other.Id, Id);
 }