davsclaus commented on code in PR #27617:
URL: https://github.com/apache/camel/pull/27617#discussion_r4232711021


##########
dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java:
##########
@@ -605,6 +605,42 @@ public void shouldSkipDockerFiles(RuntimeType rt) throws 
Exception {
         Assertions.assertTrue(new File(workingDir, "readme.md").exists(), 
"Missing readme.md");
     }
 
+    private static Stream<Arguments> runtimeAndJavaVersionProvider() {
+        return runtimeProvider()
+                .flatMap(rt -> Stream.of("21", "25").map(java -> 
Arguments.of(rt.get()[0], java)));
+    }
+
+    @ParameterizedTest
+    @MethodSource("runtimeAndJavaVersionProvider")
+    public void shouldUseJavaVersionInDockerFiles(RuntimeType rt, String 
javaVersion) throws Exception {
+        LOG.info("shouldUseJavaVersionInDockerFiles {} {}", rt, javaVersion);
+        Export command = createCommand(rt, new String[] { 
"src/test/resources/route.yaml" },
+                "--gav=examples:route:1.0.0", "--dir=" + workingDir, 
"--quiet", "--java-version=" + javaVersion);
+        int exit = command.doCall();
+
+        Assertions.assertEquals(0, exit);

Review Comment:
   Minor nit: this method mixes a JUnit assertion with AssertJ `assertThat` 
below. The project guidelines (CLAUDE.md, "Assertions: Use AssertJ When 
Possible") ask for one style per test method, and this file already uses 
`assertThat(exit).isZero()` elsewhere.
   
   ```suggestion
           assertThat(exit).isZero();
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to