public void AddScenarios() { var feature = GherkinParser.Parse(FileFullPath); FeatureClass = string.Join("", feature.Name.Split(' ').ToList().Select(y => y.Substring(0, 1).ToUpper() + y.Substring(1))) + "Feature"; Scenarios.AddRange(feature.ScenarioDefinitions.Select(x => new ParsedScenario { Tags = feature.Tags.ToList().Concat(x.Tags.ToList()).Distinct(new TagEqualityComparer()).Select(y => y.Name), MethodName = string.Join("", x.Name.Split(' ').ToList().Select(y => y.Substring(0, 1).ToUpper() + y.Substring(1))), Description = x.Steps.Select(y => y.Keyword + " " + y.Text).ToList(), Examples = RetrieveExamples(x) })); }
private static Feature ParseFeature(string featureFilePath) { return(GherkinParser .Parse(Path.Combine(ProjectDirectory, "BDD", "Features", $"{featureFilePath}.feature")) .Feature); }