Examples of InjectableStepsFactory


Examples of org.jbehave.core.steps.InjectableStepsFactory

                return storyReporter;
            }
        };
        embedder.useConfiguration(configuration);
        List<CandidateSteps> candidateSteps = embedder.candidateSteps();
        InjectableStepsFactory stepsFactory = embedder.stepsFactory();
        StoryPathResolver resolver = configuration.storyPathResolver();

        State beforeStories = mock(State.class);
        when(runner.runBeforeOrAfterStories(configuration, candidateSteps, Stage.BEFORE)).thenReturn(beforeStories);
        List<String> storyPaths = new ArrayList<String>();
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

                return storyReporter;
            }
        };
        embedder.useConfiguration(configuration);
        List<CandidateSteps> candidateSteps = embedder.candidateSteps();
        InjectableStepsFactory stepsFactory = embedder.stepsFactory();
        StoryPathResolver resolver = configuration.storyPathResolver();
        State beforeStories = mock(State.class);
        when(runner.runBeforeOrAfterStories(configuration, candidateSteps, Stage.BEFORE)).thenReturn(beforeStories);
        List<String> storyPaths = new ArrayList<String>();
        Map<String, Story> stories = new HashMap<String, Story>();
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

        List<? extends Class<? extends Embeddable>> embeddables = asList(MyStory.class, MyOtherEmbeddable.class);

        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        Configuration configuration = embedder.configuration();
        List<CandidateSteps> candidateSteps = embedder.candidateSteps();
        InjectableStepsFactory stepsFactory = embedder.stepsFactory();
        StoryPathResolver resolver = configuration.storyPathResolver();
        State beforeStories = mock(State.class);
        when(runner.runBeforeOrAfterStories(configuration, candidateSteps, Stage.BEFORE)).thenReturn(beforeStories);
        List<String> storyPaths = new ArrayList<String>();
        Map<String, Story> stories = new HashMap<String, Story>();
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

        List<? extends Class<? extends Embeddable>> embeddables = asList(MyStory.class, MyOtherEmbeddable.class);

        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        Configuration configuration = embedder.configuration();
        List<CandidateSteps> candidateSteps = embedder.candidateSteps();
        InjectableStepsFactory stepsFactory = embedder.stepsFactory();
        StoryPathResolver resolver = configuration.storyPathResolver();
        State beforeStories = mock(State.class);
        when(runner.runBeforeOrAfterStories(configuration, candidateSteps, Stage.BEFORE)).thenReturn(beforeStories);
        List<String> storyPaths = new ArrayList<String>();
        Map<String, Story> stories = new HashMap<String, Story>();
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

        List<? extends Class<? extends Embeddable>> embeddables = asList(MyStory.class, MyOtherEmbeddable.class);

        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        Configuration configuration = embedder.configuration();
        List<CandidateSteps> candidateSteps = embedder.candidateSteps();
        InjectableStepsFactory stepsFactory = embedder.stepsFactory();

        StoryPathResolver resolver = configuration.storyPathResolver();
        State beforeStories = mock(State.class);
        when(runner.runBeforeOrAfterStories(configuration, candidateSteps, Stage.BEFORE)).thenReturn(beforeStories);
        List<String> storyPaths = new ArrayList<String>();
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

        EmbedderMonitor monitor = new PrintStreamEmbedderMonitor(new PrintStream(out));
        List<? extends Class<? extends Embeddable>> embeddables = asList(MyStory.class, MyOtherEmbeddable.class);

        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        Configuration configuration = embedder.configuration();
        InjectableStepsFactory stepsFactory = embedder.stepsFactory();

        StoryPathResolver resolver = configuration.storyPathResolver();
        List<String> storyPaths = new ArrayList<String>();
        Map<String, Story> stories = new HashMap<String, Story>();
        for (Class<? extends Embeddable> embeddable : embeddables) {
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

        EmbedderMonitor monitor = new PrintStreamEmbedderMonitor(new PrintStream(out));
        List<? extends Class<? extends Embeddable>> embeddables = asList(MyStory.class, MyOtherEmbeddable.class);

        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        Configuration configuration = embedder.configuration();
        InjectableStepsFactory stepsFactory = embedder.stepsFactory();

        StoryPathResolver resolver = configuration.storyPathResolver();
        List<String> storyPaths = new ArrayList<String>();
        Map<String, Story> stories = new HashMap<String, Story>();
        for (Class<? extends Embeddable> embeddable : embeddables) {
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

public class NeedleStepsFactoryBehaviour {

  @Test
  public void stepsShouldBeCreated() throws NoSuchFieldException, IllegalAccessException {
    // Given
    final InjectableStepsFactory factory = new NeedleStepsFactory(new MostUsefulConfiguration(), FooSteps.class);
    // When
    List<CandidateSteps> steps = factory.createCandidateSteps();
    // Then
    assertEquals(1, steps.size());
    assertTrue(steps.get(0) instanceof CandidateSteps);
    Object instance = stepsInstance(steps.get(0));
    assertTrue(instance instanceof FooSteps);
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

  }

  @Test
  public void stepsShouldContainInjectedDependencies() throws NoSuchFieldException, IllegalAccessException {
    // Given
    final InjectableStepsFactory factory = new NeedleStepsFactory(new MostUsefulConfiguration(),
        FooStepsWithDependency.class);
    // When
    List<CandidateSteps> steps = factory.createCandidateSteps();
    // Then
    assertEquals(1, steps.size());
    assertTrue(steps.get(0) instanceof CandidateSteps);
    Object instance = stepsInstance(steps.get(0));
    assertTrue(instance instanceof FooStepsWithDependency);
View Full Code Here

Examples of org.jbehave.core.steps.InjectableStepsFactory

        String storyPath = "story/path";
        when(story.getPath()).thenReturn(storyPath);
        RuntimeException expected = new RuntimeException();
        when(story.getMeta()).thenThrow(expected);
       
        InjectableStepsFactory stepsFactory = mock(InjectableStepsFactory.class);
        MetaFilter metaFilter = mock(MetaFilter.class);
        State state = mock(State.class);
   
        //When
        long durationInSecs = 2;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.