File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
compatibility/src/test/java/io/cucumber/compatibility Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,11 @@ void produces_expected_output_for(TestCase testCase) throws IOException {
4848 new MessageFormatter (newOutputStream (outputNdjson )))
4949 .build ()
5050 .run ();
51- } catch (Exception ignored ) {
52-
51+ } catch (Exception e ) {
52+ // exception: Scenario with unknown parameter types fails by throwing an exceptions
53+ if (!"unknown-parameter-type" .equals (testCase .getId ())) {
54+ throw e ;
55+ }
5356 }
5457
5558 // exception: Cucumber JVM does not support named hooks
Original file line number Diff line number Diff line change 1616
1717final class TestCase {
1818
19- private static final Path FEATURES_DIRECTORY = Paths . get ( "src/test/resources/features" ) ;
19+ private static final String FEATURES_DIRECTORY = "src/test/resources/features" ;
2020 private static final String FEATURES_PACKAGE = "io.cucumber.compatibility" ;
2121
2222 private final String id ;
@@ -27,7 +27,8 @@ private TestCase(String id) {
2727
2828 static List <TestCase > testCases () throws IOException {
2929 List <TestCase > testCases = new ArrayList <>();
30- try (DirectoryStream <Path > stream = Files .newDirectoryStream (FEATURES_DIRECTORY )) {
30+ Path dir = Paths .get (FEATURES_DIRECTORY );
31+ try (DirectoryStream <Path > stream = Files .newDirectoryStream (dir )) {
3132 for (Path path : stream ) {
3233 if (path .toFile ().isDirectory ()) {
3334 testCases .add (new TestCase (path .getFileName ().toString ()));
You can’t perform that action at this time.
0 commit comments