internal Feature CreateFeature(string name, Area area) { var feature = new Feature() { Name = name, Area = area, ScenarioStats = new OutcomeStats(), StepStats = new OutcomeStats() }; area.Features.Add(feature); return feature; }
internal Area CreateArea(string name, TestRun testRun) { var area = new Area() { Name = name, TestRun = testRun, FeatureStats = new OutcomeStats(), ScenarioStats = new OutcomeStats(), StepStats = new OutcomeStats() }; testRun.Areas.Add(area); return area; }
internal Feature GetOrCreate(Area area, string name, Method method) { var feature = features.Where(x => x.Name == name && x.Area == area).FirstOrDefault(); if(feature == null) { feature = factory.CreateFeature(name, area); if(method != null) { feature.Actor = method.GetFeatureActorName(); feature.Capability = method.GetFeatureActorAction(); feature.Value = method.GetFeatureActorValue(); } features.Add(feature); } return feature; }