internal static void RegisterScenario(SbeScenario scenario, SpecflowContextWrapper specflowContext) { var assembly = GetCurrentAssembly(scenario.AssemblyName); var epic = GetCurrentEpic(assembly, specflowContext); var feature = GetCurrentFeature(epic, specflowContext); feature.Scenarios.Add(scenario); }
internal static SbeScenario GetScenario(ITestOutcomeEvent e, SpecflowContextWrapper specflowContext) { var testReflection = ReflectionService.GetTestMethodInfo(e); return(new SbeScenario { Title = specflowContext.ScenarioTitle, Tags = specflowContext.ScenarioTags, Outcome = e.Outcome, AssemblyName = testReflection.AssemblyName, NamedArgumets = testReflection.NamedArgumets }); }
private static SbeEpic GetCurrentEpic(SbeAssembly assembly, SpecflowContextWrapper specflowContext) { var epicName = specflowContext.GetEpicName(); if (!assembly.Epics.TryGetValue(epicName, out SbeEpic epic)) { epic = new SbeEpic { Name = epicName, }; assembly.Epics.Add(epicName, epic); } return(epic); }
private static SbeFeature GetCurrentFeature(SbeEpic epic, SpecflowContextWrapper specflowContext) { var title = specflowContext.FeatureTitle; if (!epic.Features.TryGetValue(title, out SbeFeature feature)) { feature = new SbeFeature { Title = specflowContext.FeatureTitle, Tags = specflowContext.FeatureTags, }; epic.Features.Add(title, feature); } return(feature); }