public void SetupContext() { FakeWriter = MockRepository.GenerateMock<ITextWriter>(); Generator = new StubGenerator(new ScenarioInterpreter(new InterpreterForTypeFactory(new ExtensionMethodHandler())), new ImplementationHelper(), FakeWriter, new FakeStoryContextFactory()); TestStory = new Story("foo", "", new[] { TestHelper.BuildScenario("", new[] { "first line", "second line" }), TestHelper.BuildScenario("", new[] { "first line", "second line", "third line" }), TestHelper.BuildScenario("", new[] { "this line's weird, punctuation! should be: handled"}) }); Generator.HandleStory(TestStory); Generator.Finished(); Suggestions = (string) FakeWriter.GetArgumentsForCallsMadeOn(x => x.Write(Arg<string>.Is.Anything))[0][0]; }
public void SetupContext() { FakeWriter = MockRepository.GenerateMock<ITextWriter>(); FakeResolver = MockRepository.GenerateMock<IAmbiguousMatchResolver>(); var scenarioInterpreter = new ScenarioInterpreter(new InterpreterForTypeFactory(new AssemblyRegistry()), FakeResolver, new DefaultLanguageService()); Generator = new StubGenerator(scenarioInterpreter, new ImplementationHelper(), FakeWriter, new FakeSessionContext()); TestStory = new Story("foo", "", new[] { TestHelper.BuildScenario("", new[] { "first line", "second line" }), TestHelper.BuildScenario("", new[] { "first line", "second line", "third line" }), TestHelper.BuildScenario("", new[] { "this line's weird, punctuation! should be: handled"}) }); Generator.HandleStories(new[] {TestStory}); Suggestions = (string) FakeWriter.GetArgumentsForCallsMadeOn(x => x.Write(Arg<string>.Is.Anything))[0][0]; }
public void SetupContext() { FakeWriter = MockRepository.GenerateMock <ITextWriter>(); FakeResolver = MockRepository.GenerateMock <IAmbiguousMatchResolver>(); var scenarioInterpreter = new ScenarioInterpreter(new InterpreterForTypeFactory(new AssemblyRegistry()), FakeResolver, new DefaultLanguageService()); Generator = new StubGenerator(scenarioInterpreter, new ImplementationHelper(), FakeWriter, new FakeSessionContext()); TestStory = new Story("foo", "", new[] { TestHelper.BuildScenario("", new[] { "first line", "second line" }), TestHelper.BuildScenario("", new[] { "first line", "second line", "third line" }), TestHelper.BuildScenario("", new[] { "this line's weird, punctuation! should be: handled" }) }); Generator.HandleStories(new[] { TestStory }); Suggestions = (string)FakeWriter.GetArgumentsForCallsMadeOn(x => x.Write(Arg <string> .Is.Anything))[0][0]; }