Search in sources :

Example 1 with Comment

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

the class StepCreatorBehaviour method shouldCreateCommentAsStepResults.

@Test
public void shouldCreateCommentAsStepResults() {
    // When
    String stepAsString = "!-- A comment";
    Step comment = StepCreator.createComment(stepAsString);
    // Then
    assertThat(comment.asString(new Keywords()), equalTo(stepAsString));
    assertThat(comment.perform(null), instanceOf(Comment.class));
    assertThat(comment.doNotPerform(null), instanceOf(Comment.class));
}
Also used : Comment(org.jbehave.core.steps.AbstractStepResult.Comment) Keywords(org.jbehave.core.configuration.Keywords) Matchers.anyString(org.mockito.Matchers.anyString) ParametrisedStep(org.jbehave.core.steps.StepCreator.ParametrisedStep) Test(org.junit.Test)

Aggregations

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