private void AddStoriesToProject(IProject project, UnitTestElementConsumer consumer, StorEvilProjectElement projectElement, IEnumerable<Story> stories) { foreach (Story story in stories) { AddStoryElement(story, project, consumer, projectElement); } }
private void AddStoryElement(Story story, IProject project, UnitTestElementConsumer consumer, StorEvilProjectElement parent) { var storyElement = GetStoryElement(parent, project, story); consumer(storyElement); foreach (IScenario scenario in story.Scenarios) AddScenarioElement(project, consumer, storyElement, scenario); }
public bool Equals(StorEvilProjectElement other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(base.Equals(other) && Equals(other._namespace, _namespace) && Equals(other.Assemblies, Assemblies)); }
public void ExploreProject(IProject project, UnitTestElementConsumer consumer) { var config = _environment.GetProject(project.ProjectFile.Location.FullPath).ConfigSettings; if (config.StoryBasePath == null) return; var stories = GetStoriesForProject(config); var projectElement = new StorEvilProjectElement(_provider, null, project, project.Name, config.AssemblyLocations); consumer(projectElement); AddStoriesToProject(project, consumer, projectElement, stories); }
public bool Equals(StorEvilProjectElement other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return base.Equals(other) && Equals(other._namespace, _namespace) && Equals(other.Assemblies, Assemblies); }
private UnitTestTask GetProjectTask(StorEvilProjectElement projectEl, IList<UnitTestElement> explicitElements) { return new UnitTestTask(projectEl, new RunProjectTask(projectEl.GetNamespace().NamespaceName, projectEl.Assemblies, explicitElements.Contains(projectEl))); }
private StorEvilStoryElement GetStoryElement(StorEvilProjectElement parent, IProject project, Story story) { return new StorEvilStoryElement(_provider, parent, project, story.Summary, story.Location); }