use of cucumber.api.junit.Cucumber in project cucumber-jvm by cucumber.
the class CucumberTest method testThatFileIsNotCreatedOnParsingError.
@Test
public void testThatFileIsNotCreatedOnParsingError() throws Exception {
try {
new Cucumber(FormatterWithLexerErrorFeature.class);
fail("Expecting error");
} catch (CucumberException e) {
assertFalse("File is created despite Lexor Error", new File("lexor_error_feature.json").exists());
}
}
use of cucumber.api.junit.Cucumber in project cucumber-jvm by cucumber.
the class CucumberTest method finds_features_based_on_explicit_root_package.
@Test
public void finds_features_based_on_explicit_root_package() throws IOException, InitializationError {
Cucumber cucumber = new Cucumber(ExplicitFeaturePath.class);
assertEquals(3, cucumber.getChildren().size());
assertEquals("Feature: FA", cucumber.getChildren().get(0).getName());
}
use of cucumber.api.junit.Cucumber in project cucumber-jvm by cucumber.
the class CucumberTest method finds_no_features_when_explicit_feature_path_has_no_features.
@Test
public void finds_no_features_when_explicit_feature_path_has_no_features() throws IOException, InitializationError {
Cucumber cucumber = new Cucumber(ExplicitFeaturePathWithNoFeatures.class);
List<FeatureRunner> children = cucumber.getChildren();
assertEquals(emptyList(), children);
}
use of cucumber.api.junit.Cucumber in project cucumber-jvm by cucumber.
the class CucumberTest method finds_features_based_on_implicit_package.
@Test
public void finds_features_based_on_implicit_package() throws IOException, InitializationError {
Cucumber cucumber = new Cucumber(ImplicitFeatureAndGluePath.class);
assertEquals(3, cucumber.getChildren().size());
assertEquals("Feature: FA", cucumber.getChildren().get(0).getName());
}
Aggregations