Ejemplo n.º 1
0
 public StubGenerator(ScenarioInterpreter scenarioInterpreter, ImplementationHelper implementationHelper, ITextWriter suggestionWriter, ISessionContext context)
 {
     _scenarioInterpreter = scenarioInterpreter;
     SuggestionWriter = suggestionWriter;
     _context = context;
     _implementationHelper = implementationHelper;
 }
 public InPlaceScenarioRunner(IResultListener listener, MemberInvoker memberInvoker,
                              ScenarioInterpreter scenarioInterpreter)
 {
     _listener = listener;
     _scenarioInterpreter = scenarioInterpreter;
     _lineExecuter = new ScenarioLineExecuter(memberInvoker, scenarioInterpreter, listener);
 }
Ejemplo n.º 3
0
 public StubGenerator(ScenarioInterpreter scenarioInterpreter, ImplementationHelper implementationHelper, ITextWriter suggestionWriter, IStoryContextFactory contextFactory)
 {
     _scenarioInterpreter = scenarioInterpreter;
     SuggestionWriter = suggestionWriter;
     _contextFactory = contextFactory;
     _implementationHelper = implementationHelper;
 }
 public ScenarioLineExecuter(MemberInvoker memberInvoker, 
                             ScenarioInterpreter scenarioInterpreter,
                             IResultListener listener)
 {
     _memberInvoker = memberInvoker;
     _listener = listener;
     _scenarioInterpreter = scenarioInterpreter;
 }
Ejemplo n.º 5
0
        public ScenarioLineExecuter(ScenarioInterpreter scenarioInterpreter,
            IEventBus eventBus)
        {
            _memberInvoker = new MemberInvoker();

            _scenarioInterpreter = scenarioInterpreter;
            _eventBus = eventBus;
        }
Ejemplo n.º 6
0
 public InPlaceStoryRunner(ScenarioInterpreter scenarioInterpreter,
     IStoryFilter filter,
     ISessionContext context,
     IEventBus eventBus)
     : base(filter, context, eventBus)
 {
     _scenarioRunner = new InPlaceScenarioRunner(eventBus, scenarioInterpreter);
 }
Ejemplo n.º 7
0
 public InPlaceStoryRunner(IResultListener listener,
                           IScenarioPreprocessor preprocessor,
                           ScenarioInterpreter scenarioInterpreter,
                           IStoryFilter filter,
                           IStoryContextFactory contextFactory)
     : base(listener, preprocessor, filter, contextFactory)
 {
     _scenarioRunner = new InPlaceScenarioRunner(listener,new MemberInvoker(), scenarioInterpreter);
 }
Ejemplo n.º 8
0
        protected DriverBase(IResultListener listener)
        {
            _listener = listener;

            ScenarioInterpreter = new ScenarioInterpreter(new InterpreterForTypeFactory(new ExtensionMethodHandler()));

            LineExecuter = new ScenarioLineExecuter(new MemberInvoker(), ScenarioInterpreter, _listener);

            ContextFactory = new StoryContextFactory();
        }
Ejemplo n.º 9
0
 protected DriverBase(IEventBus eventBus)
 {
     //ResultListener = resultListener;
     _eventBus = eventBus;
     var assemblyRegistry = new AssemblyRegistry(GetAssemblies());
     ScenarioInterpreter = new ScenarioInterpreter(new InterpreterForTypeFactory(assemblyRegistry), new MostRecentlyUsedContext(), new DefaultLanguageService());
     LineExecuter = new ScenarioLineExecuter(ScenarioInterpreter, _eventBus);
     _context = new SessionContext(assemblyRegistry);
     ParameterConverter.AddCustomConverters(assemblyRegistry);
 }
        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 CSharpMethodInvocationGenerator(ScenarioInterpreter interpreter)
 {
     _interpreter = interpreter;
 }
Ejemplo n.º 12
0
 public InPlaceScenarioRunner(IEventBus eventBus, ScenarioInterpreter scenarioInterpreter)
 {
     _eventBus = eventBus;
     _scenarioInterpreter = scenarioInterpreter;
     _lineExecuter = new ScenarioLineExecuter(scenarioInterpreter, eventBus);
 }