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 e3b2d62b48c Fix tests on Windows no taking care of end of lines in 
camel-core
e3b2d62b48c is described below

commit e3b2d62b48c7e9121dad1dd91071b2684133e2eb
Author: Aurélien Pupier <apup...@redhat.com>
AuthorDate: Wed Jun 4 17:10:58 2025 +0200

    Fix tests on Windows no taking care of end of lines in camel-core
    
    Signed-off-by: Aurélien Pupier <apup...@redhat.com>
---
 .../apache/camel/processor/NestedChoiceWithEndChoiceIssueTest.java    | 4 ++--
 .../apache/camel/util/DumpModelAsYamlTransformChoiceRouteTest.java    | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/NestedChoiceWithEndChoiceIssueTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/NestedChoiceWithEndChoiceIssueTest.java
index 0145a2090af..da761400cb7 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/NestedChoiceWithEndChoiceIssueTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/NestedChoiceWithEndChoiceIssueTest.java
@@ -26,9 +26,9 @@ import org.apache.camel.spi.NodeIdFactory;
 import org.apache.camel.support.PluginHelper;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.StringHelper;
-import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class NestedChoiceWithEndChoiceIssueTest extends ContextTestSupport {
@@ -61,7 +61,7 @@ public class NestedChoiceWithEndChoiceIssueTest extends 
ContextTestSupport {
                         
Paths.get("src/test/resources/org/apache/camel/processor/NestedChoiceWithEndChoiceIssueTest.xml"),
 "#",
                         true);
         expected = StringHelper.after(expected, "-->");
-        Assertions.assertEquals(expected, "\n" + xml + "\n");
+        assertThat(expected).isEqualToNormalizingNewlines("\n" + xml + "\n");
 
         getMockEndpoint("mock:result").expectedMessageCount(1);
         getMockEndpoint("mock:result").expectedBodiesReceived("2");
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsYamlTransformChoiceRouteTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsYamlTransformChoiceRouteTest.java
index 3a92fee8bd8..455cbe646d7 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsYamlTransformChoiceRouteTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/util/DumpModelAsYamlTransformChoiceRouteTest.java
@@ -23,6 +23,7 @@ import org.apache.camel.support.PluginHelper;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class DumpModelAsYamlTransformChoiceRouteTest extends 
DumpModelAsYamlTestSupport {
@@ -36,7 +37,7 @@ public class DumpModelAsYamlTransformChoiceRouteTest extends 
DumpModelAsYamlTest
         String expected
                 = 
IOHelper.stripLineComments(Paths.get("src/test/resources/org/apache/camel/util/transform3.xml"),
 "#", true);
         expected = StringHelper.after(expected, "-->");
-        Assertions.assertEquals(expected, "\n" + xml + "\n");
+        assertThat(expected).isEqualToNormalizingNewlines("\n" + xml + "\n");
     }
 
     @Test

Reply via email to