private IEnumerable<Story> GetStoriesForProject(ConfigSettings config) { var filesystemStoryReader = new FilesystemStoryReader(new Filesystem(), config); var storyProvider = new StoryProvider(filesystemStoryReader, new StoryParser()); return storyProvider.GetStories(); }
public void SetupContext() { FakeFilesystem = MockRepository.GenerateMock<IFilesystem>(); Settings = new ConfigSettings {StoryBasePath = BasePath}; Reader = new FilesystemStoryReader(FakeFilesystem, Settings); FakeFilesystem.Stub(x => x.GetFilesInFolder(BasePath)) .Return(new[] {"ignore.txt", "feature.feature","bar.story"}); FakeFilesystem.Stub(x => x.GetSubFolders(BasePath)) .Return(new string[0]); }
public void SetupContext() { FakeFilesystem = MockRepository.GenerateMock <IFilesystem>(); Settings = new ConfigSettings { StoryBasePath = BasePath }; Reader = new FilesystemStoryReader(FakeFilesystem, Settings); FakeFilesystem.Stub(x => x.GetFilesInFolder(BasePath)) .Return(new[] { "ignore.txt", "feature.feature", "bar.story" }); FakeFilesystem.Stub(x => x.GetSubFolders(BasePath)) .Return(new string[0]); }
public void SetupContext() { FakeFilesystem = MockRepository.GenerateMock <IFilesystem>(); Settings = new ConfigSettings { StoryBasePath = BasePath, ScenarioExtensions = new string[] {} }; Reader = new FilesystemStoryReader(FakeFilesystem, Settings); FakeFilesystem.Stub(x => x.GetFilesInFolder(BasePath)) .Return(new[] { "ignore.txt", "feature.feature" }); FakeFilesystem.Stub(x => x.GetFileText(BasePath + "\\ignore.txt")) .Return(NotAStory); FakeFilesystem.Stub(x => x.GetFileText(BasePath + "\\feature.feature")) .Return(AStory); FakeFilesystem.Stub(x => x.GetSubFolders(BasePath)) .Return(new string[0]); }
public void SetupContext() { FakeFilesystem = MockRepository.GenerateMock<IFilesystem>(); Settings = new ConfigSettings {StoryBasePath = BasePath, ScenarioExtensions = new string[] {}}; Reader = new FilesystemStoryReader(FakeFilesystem, Settings); FakeFilesystem.Stub(x => x.GetFilesInFolder(BasePath)) .Return(new[] { "ignore.txt", "feature.feature" }); FakeFilesystem.Stub(x => x.GetFileText(BasePath + "\\ignore.txt")) .Return(NotAStory); FakeFilesystem.Stub(x => x.GetFileText(BasePath + "\\feature.feature")) .Return(AStory); FakeFilesystem.Stub(x => x.GetSubFolders(BasePath)) .Return(new string[0]); }