Search in sources :

Example 1 with Pending

use of org.jbehave.core.steps.AbstractStepResult.Pending in project jbehave-core by jbehave.

the class StepCreatorBehaviour method shouldCreatePendingAsStepResults.

@Test
public void shouldCreatePendingAsStepResults() {
    // When
    String stepAsString = "When I'm pending";
    Step pendingStep = StepCreator.createPendingStep(stepAsString, null);
    // Then
    assertThat(pendingStep.asString(new Keywords()), equalTo(stepAsString));
    assertThat(pendingStep.perform(null), instanceOf(Pending.class));
    assertThat(pendingStep.doNotPerform(null), instanceOf(Pending.class));
}
Also used : Keywords(org.jbehave.core.configuration.Keywords) Matchers.anyString(org.mockito.Matchers.anyString) ParametrisedStep(org.jbehave.core.steps.StepCreator.ParametrisedStep) Pending(org.jbehave.core.steps.AbstractStepResult.Pending) Test(org.junit.Test)

Aggregations

Keywords (org.jbehave.core.configuration.Keywords)1 Pending (org.jbehave.core.steps.AbstractStepResult.Pending)1 ParametrisedStep (org.jbehave.core.steps.StepCreator.ParametrisedStep)1 Test (org.junit.Test)1 Matchers.anyString (org.mockito.Matchers.anyString)1