google / polymorphicDSL

Apache License 2.0
11 stars 7 forks source link

JUnit5 runner resource URIs are not encapsulated from other test parameters #108

Open incident-recipient opened 1 month ago

incident-recipient commented 1 month ago

If one parameter specifies a specific feature file and the second another, then the second will try to execute all of them even though it should have no awareness of the other.

incident-recipient commented 1 month ago

e.g., (After translating manually from Kotlin, so there might be some other superfluous syntax issue)

In the below config, we'd expect

but it looks like all the files are viewed by all the parsers

 PdslConfigParameter.createGherkinPdslConfig(
                    List.of(
                        PdslTestParameter.Builder(
                            SomeLexer.java, SomeParser.java,
                        ) { firstVisitor }
                            .withIncludedResources(new String[]{"FirstFeature.feature"})
                            .withStartRule("firstFeatureAllRules")
                            .build(),

                        PdslTestParameter.Builder(
                            SecondLexer.java, SecondParser.java,
                        ) { secondVisitor }
                            .withIncludedResources(new String[]{"SecondFeature.feature"})
                            .withStartRule("secondFeatureAllRuels")
                            .build(),