cucumber-jvm icon indicating copy to clipboard operation
cucumber-jvm copied to clipboard

cucumber-archetype imports org.junit.jupiter.api.Assertions.* as a normal import not as a static import

Open paltaie opened this issue 1 year ago • 1 comments

👓 What did you see?

I tried the 10 minute tutorial and noticed that the "hellocucumber" project that's created has these imports in StepDefinitions:

https://github.com/cucumber/cucumber-jvm/blob/e9f99b11d2d8668db461fc9b45f5eb231653c17a/cucumber-archetype/src/main/resources/archetype-resources/src/test/java/StepDefinitions.java#L3-L5

But I guess you wanted to import static the Assertions so that you can do things like assertEquals without having to import anything. And indeed in the "Ubiquitous Language" section it magically changes to an import static.

✅ What did you expect to see?

A static import

📦 Which tool/library version are you using?

            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-bom</artifactId>
                <version>7.18.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

🔬 How could we reproduce it?

Create an empty cucumber project as per https://cucumber.io/docs/guides/10-minute-tutorial/?lang=java

📚 Any additional context?

No response

paltaie avatar Jul 03 '24 10:07 paltaie