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
The following commit(s) were added to refs/heads/main by this push:
new b51f31c039b4 camel-spring-ws: replaces fest-assert with assertj
b51f31c039b4 is described below
commit b51f31c039b4a7a965af890124e061f569e679d1
Author: Marco Carletti <[email protected]>
AuthorDate: Mon Mar 2 09:12:19 2026 +0100
camel-spring-ws: replaces fest-assert with assertj
---
.../camel-spring-parent/camel-spring-ws/pom.xml | 5 ++--
.../ws/addressing/AbstractConsumerTests.java | 2 +-
.../ws/addressing/CamelDirectSenderTest.java | 2 +-
.../ws/addressing/ProducerParamsBasicTest.java | 2 +-
.../addressing/ProducerParamsPrecedenceTest.java | 2 +-
.../ws/filter/impl/BasicMessageFilterTest.java | 35 ++++++++++++----------
6 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/components/camel-spring-parent/camel-spring-ws/pom.xml
b/components/camel-spring-parent/camel-spring-ws/pom.xml
index 28c5d656b69f..3c63fb00d183 100644
--- a/components/camel-spring-parent/camel-spring-ws/pom.xml
+++ b/components/camel-spring-parent/camel-spring-ws/pom.xml
@@ -153,9 +153,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.easytesting</groupId>
- <artifactId>fest-assert</artifactId>
- <version>1.4</version>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
diff --git
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java
index 4028f749c73c..2ce79cc0a834 100644
---
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java
+++
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractConsumerTests.java
@@ -18,7 +18,7 @@ package org.apache.camel.component.spring.ws.addressing;
import java.net.URI;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.ws.soap.addressing.client.ActionCallback;
diff --git
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java
index 0d87a73201ae..96743f65bdbf 100644
---
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java
+++
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/CamelDirectSenderTest.java
@@ -24,7 +24,7 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.component.spring.ws.utils.OutputChannelReceiver;
import org.apache.camel.component.spring.ws.utils.TestUtil;
import org.apache.camel.test.spring.junit6.CamelSpringTest;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
diff --git
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/ProducerParamsBasicTest.java
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/ProducerParamsBasicTest.java
index aac67d06e9f5..6b64d0c1b629 100644
---
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/ProducerParamsBasicTest.java
+++
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/ProducerParamsBasicTest.java
@@ -23,7 +23,7 @@ import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.spring.ws.utils.OutputChannelReceiver;
import org.apache.camel.component.spring.ws.utils.TestUtil;
import org.apache.camel.test.spring.junit6.CamelSpringTestSupport;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
diff --git
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/ProducerParamsPrecedenceTest.java
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/ProducerParamsPrecedenceTest.java
index b44865cb4eae..58173de8dacd 100644
---
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/ProducerParamsPrecedenceTest.java
+++
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/ProducerParamsPrecedenceTest.java
@@ -23,7 +23,7 @@ import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.spring.ws.utils.OutputChannelReceiver;
import org.apache.camel.component.spring.ws.utils.TestUtil;
import org.apache.camel.test.spring.junit6.CamelSpringTestSupport;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
diff --git
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
index 055a233e1303..414b8d39fbaf 100644
---
a/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
+++
b/components/camel-spring-parent/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
@@ -23,7 +23,8 @@ import javax.xml.namespace.QName;
import org.apache.camel.attachment.AttachmentMessage;
import org.apache.camel.component.spring.ws.SpringWebserviceConstants;
import org.apache.camel.test.junit6.ExchangeTestSupport;
-import org.fest.assertions.Assertions;
+import org.assertj.core.api.Assertions;
+import org.assertj.core.util.Streams;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.ws.pox.dom.DomPoxMessage;
@@ -79,10 +80,10 @@ public class BasicMessageFilterTest extends
ExchangeTestSupport {
filter.filterProducer(exchange, message);
filter.filterConsumer(exchange, message);
- Assertions.assertThat(message.getAttachments()).isEmpty();
-
Assertions.assertThat(message.getSoapHeader().examineAllHeaderElements()).isEmpty();
+ Assertions.assertThat(message.getAttachments()).isExhausted();
+
Assertions.assertThat(message.getSoapHeader().examineAllHeaderElements()).isExhausted();
-
Assertions.assertThat(message.getSoapHeader().getAllAttributes()).isEmpty();
+
Assertions.assertThat(message.getSoapHeader().getAllAttributes()).isExhausted();
}
@Test
@@ -101,10 +102,10 @@ public class BasicMessageFilterTest extends
ExchangeTestSupport {
filter.filterConsumer(exchange, message);
- Assertions.assertThat(message.getAttachments()).isEmpty();
-
Assertions.assertThat(message.getSoapHeader().examineAllHeaderElements()).isEmpty();
+ Assertions.assertThat(message.getAttachments()).isExhausted();
+
Assertions.assertThat(message.getSoapHeader().examineAllHeaderElements()).isExhausted();
-
Assertions.assertThat(message.getSoapHeader().getAllAttributes()).isEmpty();
+
Assertions.assertThat(message.getSoapHeader().getAllAttributes()).isExhausted();
}
@Test
@@ -113,11 +114,12 @@ public class BasicMessageFilterTest extends
ExchangeTestSupport {
exchange.getOut().getHeaders().put("headerAttributeElement", new
QName("http://shouldBeInHeader", "myElement"));
filter.filterConsumer(exchange, message);
- Assertions.assertThat(message.getAttachments()).isEmpty();
+ Assertions.assertThat(message.getAttachments()).isExhausted();
-
Assertions.assertThat(message.getSoapHeader().examineAllHeaderElements()).isNotEmpty().hasSize(1);
+
Assertions.assertThat(Streams.stream(message.getSoapHeader().examineAllHeaderElements()).toList()).isNotEmpty()
+ .hasSize(1);
-
Assertions.assertThat(message.getSoapHeader().getAllAttributes()).isNotEmpty().hasSize(1);
+
Assertions.assertThat(Streams.stream(message.getSoapHeader().getAllAttributes()).toList()).isNotEmpty().hasSize(1);
}
@@ -129,11 +131,12 @@ public class BasicMessageFilterTest extends
ExchangeTestSupport {
filter.filterProducer(exchange, message);
- Assertions.assertThat(message.getAttachments()).isEmpty();
+ Assertions.assertThat(message.getAttachments()).isExhausted();
-
Assertions.assertThat(message.getSoapHeader().examineAllHeaderElements()).isNotEmpty().hasSize(1);
+
Assertions.assertThat(Streams.stream(message.getSoapHeader().examineAllHeaderElements()).toList()).isNotEmpty()
+ .hasSize(1);
-
Assertions.assertThat(message.getSoapHeader().getAllAttributes()).isNotEmpty().hasSize(2);
+
Assertions.assertThat(Streams.stream(message.getSoapHeader().getAllAttributes()).toList()).isNotEmpty().hasSize(2);
}
@@ -142,7 +145,7 @@ public class BasicMessageFilterTest extends
ExchangeTestSupport {
filter.filterConsumer(exchange, message);
filter.filterProducer(exchange, message);
- Assertions.assertThat(message.getAttachments()).isEmpty();
+ Assertions.assertThat(message.getAttachments()).isExhausted();
}
@Test
@@ -152,7 +155,7 @@ public class BasicMessageFilterTest extends
ExchangeTestSupport {
filter.filterProducer(exchange, message);
-
Assertions.assertThat(message.getAttachments()).isNotNull().isNotEmpty();
+
Assertions.assertThat(Streams.stream(message.getAttachments()).toList()).isNotEmpty();
Assertions.assertThat(message.getAttachment("testAttachment")).isNotNull();
}
@@ -163,7 +166,7 @@ public class BasicMessageFilterTest extends
ExchangeTestSupport {
filter.filterConsumer(exchange, message);
-
Assertions.assertThat(message.getAttachments()).isNotNull().isNotEmpty();
+
Assertions.assertThat(Streams.stream(message.getAttachments()).toList()).isNotEmpty();
Assertions.assertThat(message.getAttachment("testAttachment")).isNotNull();
}
}