Package org.jbehave.core.configuration.scala

Examples of org.jbehave.core.configuration.scala.ScalaContext$ScalaInstanceNotFound


public class ScalaStepsFactoryBehaviour {

    @Test
    public void shouldCreateStepsInstancesFromScalaWhenAnnotated() {
        ScalaContext context = new ScalaContext("AnnotatedSteps", "NonAnnotatedSteps");
        ScalaStepsFactory factory = new ScalaStepsFactory(new MostUsefulConfiguration(), context);
        List<Class<?>> types = factory.stepsTypes();
        MatcherAssert.assertThat(types.size(), Matchers.equalTo(1));
        assertThat(types.get(0).getSimpleName(), equalTo("AnnotatedSteps"));
        Object object = factory.createInstanceOfType(context.newInstance("AnnotatedSteps").getClass());
        assertThat(object.getClass().getName(), equalTo("AnnotatedSteps"));
    }
View Full Code Here


        assertThat(object.getClass().getName(), equalTo("AnnotatedSteps"));
    }

    @Test(expected = ScalaInstanceNotFound.class)
    public void shouldNotCreateStepsInstancesFromScalaWhenContextInvalid() {
        new ScalaStepsFactory(new MostUsefulConfiguration(), new ScalaContext("InexistentSteps"));
    }
View Full Code Here

        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

                .findPaths(codeLocationFromClass(this.getClass()), "**/*.story", "");
    }

    @Override
    public InjectableStepsFactory stepsFactory() {
        return new ScalaStepsFactory(configuration(), new ScalaContext("ScalaSteps"));
    }
View Full Code Here

TOP

Related Classes of org.jbehave.core.configuration.scala.ScalaContext$ScalaInstanceNotFound

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.