use of io.cucumber.junit.PickleRunners.PickleRunner in project cucumber-jvm by cucumber.
the class PickleRunnerWithStepDescriptionsTest method shouldUseScenarioNameForDisplayName.
@Test
void shouldUseScenarioNameForDisplayName() {
List<Pickle> pickles = picklesFromFeature("featurePath", "" + "Feature: feature name\n" + " Scenario: scenario name\n" + " Then it works\n");
PickleRunner runner = PickleRunners.withStepDescriptions(context, pickles.get(0), null, createJunitOptions());
assertEquals("scenario name", runner.getDescription().getDisplayName());
}
use of io.cucumber.junit.PickleRunners.PickleRunner in project cucumber-jvm by cucumber.
the class PickleRunnerWithNoStepDescriptionsTest method shouldConvertTextFromFeatureFileForNamesWithFilenameCompatibleNameOption.
@Test
void shouldConvertTextFromFeatureFileForNamesWithFilenameCompatibleNameOption() {
List<Pickle> pickles = TestPickleBuilder.picklesFromFeature("featurePath", "" + "Feature: feature name\n" + " Scenario: scenario name\n" + " Then it works\n");
PickleRunner runner = PickleRunners.withNoStepDescriptions("feature name", context, pickles.get(0), null, createFileNameCompatibleJUnitOptions());
assertThat(runner.getDescription().getDisplayName(), is(equalTo("scenario_name(feature_name)")));
}
Aggregations