Package org.jbehave.core.configuration

Examples of org.jbehave.core.configuration.MostUsefulConfiguration


        new ScalaStepsFactory(new MostUsefulConfiguration(), new ScalaContext("InexistentSteps"));
    }

    @Test(expected = ScalaInstanceNotFound.class)
    public void shouldNotCreateStepsInstancesFromScalaWhenNotFound() {
        ScalaStepsFactory factory = new ScalaStepsFactory(new MostUsefulConfiguration(), new ScalaContext());
        factory.createInstanceOfType(NonScalaType.class);
    }
View Full Code Here


        private InjectableStepsFactory stepsFactory;

        public MethodReturningConverter(Method method, Object instance) {
            this.method = method;
            this.stepsType = instance.getClass();
            this.stepsFactory = new InstanceStepsFactory(new MostUsefulConfiguration(), instance);
        }
View Full Code Here

  @Test
  public void shouldBuildDefaultConfigurationIfAnnotationOrAnnotatedValuesNotPresent() {
    SpringAnnotationBuilder builderNotAnnotated = new SpringAnnotationBuilder(
        NotAnnotated.class);
    assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(),
        new MostUsefulConfiguration());
    SpringAnnotationBuilder builderAnnotatedWithoutLocations = new SpringAnnotationBuilder(
        AnnotatedWithoutResources.class);
    assertThatConfigurationIs(
        builderAnnotatedWithoutLocations.buildConfiguration(),
        new MostUsefulConfiguration());
  }
View Full Code Here

  @Test
  public void stepsCanBeCreated() {
    // Given
    ApplicationContext context = createApplicationContext("org/jbehave/core/steps/spring/steps.xml");
    SpringStepsFactory factory = new SpringStepsFactory(
        new MostUsefulConfiguration(), context);
    // When
    List<CandidateSteps> steps = factory.createCandidateSteps();
    // Then
    assertFooStepsFound(steps);
  }
View Full Code Here

  public void annotationStepsCanBeCreated() throws Exception {
    // Given
    ApplicationContext context = createApplicationContext(StepsAnnotationConfiguration.class
        .getName());
    SpringStepsFactory factory = new SpringStepsFactory(
        new MostUsefulConfiguration(), context);
    // When
    List<CandidateSteps> steps = factory.createCandidateSteps();
    // Then
    assertFooStepsFound(steps);
  }
View Full Code Here

  public void stepsWithDependenciesCanBeCreated() {
    // Given
    ApplicationContext context = createApplicationContext("org/jbehave/core/steps/spring/steps-with-dependency.xml");
    // When
    SpringStepsFactory factory = new SpringStepsFactory(
        new MostUsefulConfiguration(), context);
    List<CandidateSteps> steps = factory.createCandidateSteps();
    // Then
    assertFooStepsFound(steps);
    assertEquals(
        42,
View Full Code Here

    // Given
    ApplicationContext context = createApplicationContext(StepsWithDependencyAnnotationConfiguration.class
        .getName());
    // When
    SpringStepsFactory factory = new SpringStepsFactory(
        new MostUsefulConfiguration(), context);
    List<CandidateSteps> steps = factory.createCandidateSteps();
    // Then
    assertFooStepsFound(steps);
    assertEquals(
        42,
View Full Code Here

  @Test(expected = BeanDefinitionStoreException.class)
  public void stepsWithMissingDependenciesCannotBeCreated() {
    // Given
    ApplicationContext context = createApplicationContext("org/jbehave/core/steps/spring/steps-with-missing-depedency.xml");
    SpringStepsFactory factory = new SpringStepsFactory(
        new MostUsefulConfiguration(), context);
    // When
    factory.createCandidateSteps();
    // Then ... expected exception is thrown
  }
View Full Code Here

  @Test
  public void beansWithUndefinedTypeOrCannotBeCreatedWillBeIgnored() {
    // Given
    ApplicationContext context = mock(ApplicationContext.class);
    SpringStepsFactory factory = new SpringStepsFactory(
        new MostUsefulConfiguration(), context);
    // When
    when(context.getBeanDefinitionNames()).thenReturn(
        new String[] { "fooSteps", "undefined", "blowUp" });
    doAnswer(new Answer<Class<FooSteps>>() {
View Full Code Here

  public void aopEnvelopedStepsCanBeCreated() {
    // Given
    ApplicationContext context = createApplicationContext(StepsWithAOPAnnotationConfiguration.class
        .getName());
    SpringStepsFactory factory = new SpringStepsFactory(
        new MostUsefulConfiguration(), context);
    // When
    List<CandidateSteps> steps = factory.createCandidateSteps();
    // Then
    assertAOPFooStepsFound(steps);
  }
View Full Code Here

TOP

Related Classes of org.jbehave.core.configuration.MostUsefulConfiguration

Copyright © 2018 www.massapicom. 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.