private static void RemoveAutoGeneratedStepsThatDuplicateUserSteps(string file, NodeFeature feature) { string[] contents = File.ReadAllLines(file); StepDefinitionParser parser = new StepDefinitionParser(); List <FeatureGroup> groups = parser.Parse(contents); var filterGroup = groups.FirstOrDefault(featureGroup => featureGroup.FeatureName == feature.Name); if (filterGroup != null) { foreach (var scenario in feature.Scenarios) { foreach (var filterStep in filterGroup.Steps) { scenario.Steps.RemoveAll(step => step.Equals(filterStep)); } } } }
private static void RemoveAutoGeneratedStepsThatDuplicateUserSteps(string file, NodeFeature feature) { string[] contents = File.ReadAllLines(file); StepDefinitionParser parser = new StepDefinitionParser(); List<FeatureGroup> groups = parser.Parse(contents); var filterGroup = groups.FirstOrDefault(featureGroup => featureGroup.FeatureName == feature.Name); if (filterGroup != null) { foreach (var scenario in feature.Scenarios) { foreach (var filterStep in filterGroup.Steps) { scenario.Steps.RemoveAll(step => step.Equals(filterStep)); } } } }