This is an automated email from the ASF dual-hosted git repository.

veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-axiom.git


The following commit(s) were added to refs/heads/master by this push:
     new b97a8706f Migrate JUnit 3 assertions to AssertJ in 
BooleanPropertyTestCase and EventSpecificTestCase
b97a8706f is described below

commit b97a8706f9bae542373e68e8a3fe35c088e3ad66
Author: Copilot <[email protected]>
AuthorDate: Sun May 17 17:53:13 2026 +0100

    Migrate JUnit 3 assertions to AssertJ in BooleanPropertyTestCase and 
EventSpecificTestCase
    
    Co-authored-by: Andreas Veithen-Knowles <[email protected]>
---
 .../org/apache/axiom/util/stax/dialect/BooleanPropertyTestCase.java   | 4 +++-
 .../org/apache/axiom/util/stax/dialect/EventSpecificTestCase.java     | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/BooleanPropertyTestCase.java
 
b/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/BooleanPropertyTestCase.java
index 33d38c5be..cca64964c 100644
--- 
a/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/BooleanPropertyTestCase.java
+++ 
b/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/BooleanPropertyTestCase.java
@@ -18,6 +18,8 @@
  */
 package org.apache.axiom.util.stax.dialect;
 
+import static org.assertj.core.api.Assertions.assertThat;
+
 import com.google.inject.Inject;
 import com.google.inject.name.Named;
 import javax.xml.stream.XMLStreamReader;
@@ -29,7 +31,7 @@ public abstract class BooleanPropertyTestCase extends 
EventSpecificTestCase {
 
     @Override
     protected void runTest(XMLStreamReader reader) throws Throwable {
-        assertEquals(expected, invoke(reader));
+        assertThat(invoke(reader)).isEqualTo(expected);
     }
 
     protected abstract boolean invoke(XMLStreamReader reader);
diff --git 
a/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/EventSpecificTestCase.java
 
b/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/EventSpecificTestCase.java
index 5690a2227..68ed0aa0b 100644
--- 
a/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/EventSpecificTestCase.java
+++ 
b/axiom-api/src/test/java/org/apache/axiom/util/stax/dialect/EventSpecificTestCase.java
@@ -23,6 +23,7 @@ import com.google.inject.name.Named;
 import java.io.InputStream;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
+import org.assertj.core.api.Assertions;
 
 /**
  * Base class for test cases that test the behavior of a {@link 
XMLStreamReader} method for specific
@@ -47,7 +48,7 @@ public abstract class EventSpecificTestCase extends 
DialectTestCase {
                 } else if (reader.hasNext()) {
                     reader.next();
                 } else {
-                    fail("Internal error: didn't encounter event " + event);
+                    Assertions.fail("Internal error: didn't encounter event " 
+ event);
                 }
             }
             runTest(reader);

Reply via email to