use of org.jbehave.core.steps.StepCreator.ParametrisedStep in project jbehave-core by jbehave.
the class StepCreatorBehaviour method shouldDescribeStepToReporterBeforeExecutingParametrisedStep.
@Test
public void shouldDescribeStepToReporterBeforeExecutingParametrisedStep() throws IntrospectionException {
// Given
SomeSteps stepsInstance = new SomeSteps();
InjectableStepsFactory stepsFactory = new InstanceStepsFactory(new MostUsefulConfiguration(), stepsInstance);
StepCreator stepCreator = new StepCreator(stepsInstance.getClass(), stepsFactory, stepsContext, null, new ParameterControls(), null, new SilentStepMonitor());
StoryReporter storyReporter = mock(StoryReporter.class);
// When
Method method = SomeSteps.methodFor("aMethod");
((ParametrisedStep) stepCreator.createParametrisedStep(method, "When I run", "I run", null)).describeTo(storyReporter);
// Then
verify(storyReporter).beforeStep("When I run");
}
Aggregations