You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ap...@apache.org on 2025/06/19 08:47:14 UTC
(camel) branch main updated: Avoid asserting to an incompatible type
This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 1685af0faa2 Avoid asserting to an incompatible type
1685af0faa2 is described below
commit 1685af0faa2bd0ad5ffa9e5e9628068f1bf68e50
Author: Aurélien Pupier <ap...@redhat.com>
AuthorDate: Thu Jun 19 10:29:00 2025 +0200
Avoid asserting to an incompatible type
and use the specific method checking that a method does not throw an
exception which was the intent of the test based on the comment.
Signed-off-by: Aurélien Pupier <ap...@redhat.com>
---
.../org/apache/camel/dsl/jbang/core/common/PluginHelperTest.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/common/PluginHelperTest.java b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/common/PluginHelperTest.java
index 34c3e7daaf4..1efc607f078 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/common/PluginHelperTest.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/common/PluginHelperTest.java
@@ -25,6 +25,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class PluginHelperTest {
@@ -38,11 +39,8 @@ public class PluginHelperTest {
}
@Test
- public void testEmbeddedPluginDetection() throws Exception {
- // Test that embedded plugins can be detected
- boolean hasEmbedded = PluginHelper.hasEmbeddedPlugins();
- // This may be false in test environment, but should not throw exceptions
- assertNotNull(hasEmbedded);
+ public void testEmbeddedPluginDetectionDoesNotThrowException() {
+ assertDoesNotThrow(PluginHelper::hasEmbeddedPlugins);
}
@Test