You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by fm...@apache.org on 2024/06/04 13:00:11 UTC
(camel) 03/03: Use AssertJ
This is an automated email from the ASF dual-hosted git repository.
fmariani pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit ca1da6a416d67d31414a64bb3866ca46256fec13
Author: Croway <fe...@gmail.com>
AuthorDate: Mon Jun 3 10:57:57 2024 +0200
Use AssertJ
---
components/camel-ai/camel-langchain4j-chat/pom.xml | 6 ++++++
.../camel/component/langchain4j.chat/LangChain4jConsumerIT.java | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/components/camel-ai/camel-langchain4j-chat/pom.xml b/components/camel-ai/camel-langchain4j-chat/pom.xml
index bc1e423b84a..a7c122f9605 100644
--- a/components/camel-ai/camel-langchain4j-chat/pom.xml
+++ b/components/camel-ai/camel-langchain4j-chat/pom.xml
@@ -79,6 +79,12 @@
<version>${langchain4j-version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <version>${assertj-version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
diff --git a/components/camel-ai/camel-langchain4j-chat/src/test/java/org/apache/camel/component/langchain4j.chat/LangChain4jConsumerIT.java b/components/camel-ai/camel-langchain4j-chat/src/test/java/org/apache/camel/component/langchain4j.chat/LangChain4jConsumerIT.java
index 53186b8d1f2..21f6f2fe81f 100644
--- a/components/camel-ai/camel-langchain4j-chat/src/test/java/org/apache/camel/component/langchain4j.chat/LangChain4jConsumerIT.java
+++ b/components/camel-ai/camel-langchain4j-chat/src/test/java/org/apache/camel/component/langchain4j.chat/LangChain4jConsumerIT.java
@@ -30,7 +30,7 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.langchain4j.chat.tool.CamelSimpleToolParameter;
import org.apache.camel.component.langchain4j.chat.tool.NamedJsonSchemaProperty;
import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Assertions;
+import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
@@ -88,6 +88,7 @@ public class LangChain4jConsumerIT extends CamelTestSupport {
Exchange message = fluentTemplate.to("direct:test").withBody(messages).request(Exchange.class);
- Assertions.assertTrue(message.getMessage().getBody().toString().contains(nameFromDB));
+ Assertions.assertThat(message).isNotNull();
+ Assertions.assertThat(message.getMessage().getBody().toString()).contains(nameFromDB);
}
}