You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Aurélien Pupier (Jira)" <ji...@apache.org> on 2024/12/09 07:49:00 UTC
[jira] [Created] (CAMEL-21523) Improve assertions when checking for a Maven dependency
Aurélien Pupier created CAMEL-21523:
---------------------------------------
Summary: Improve assertions when checking for a Maven dependency
Key: CAMEL-21523
URL: https://issues.apache.org/jira/browse/CAMEL-21523
Project: Camel
Issue Type: Task
Components: camel-jbang
Affects Versions: 4.9.0
Reporter: Aurélien Pupier
In Camel JBang tests, there are several assertions checking the p^resence of a specific Maven dependency. it is asserting true/false by looking for each field one by one. Only an high levvel true/false assertion is returned. it is making it hard to know what is checked without looking deepp in the code and placing breakpoints.
Providing an assertion specific for the Maven dependency and mentioning which one was expected and which one was found/not found will simplify debugging.
several of these checks are used in https://github.com/apache/camel/blob/main/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java
for instance:
{noformat}
Assertions.assertTrue(
containsDependency(model.getDependencies(), "org.apache.camel.springboot", "camel-kubernetes-starter",
null));
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)