Author: veithen
Date: Mon Aug 24 23:07:14 2015
New Revision: 1697514

URL: http://svn.apache.org/r1697514
Log:
Use Google Truth to generate a better diagnostic message when 
OMElementDispatchTest fails.

Modified:
    axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml
    
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/OMElementDispatchTest.java
    axis/axis2/java/core/trunk/modules/parent/pom.xml

Modified: axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml?rev=1697514&r1=1697513&r2=1697514&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml Mon Aug 24 
23:07:14 2015
@@ -87,6 +87,11 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>xml-truth</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>
             <scope>test</scope>

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/OMElementDispatchTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/OMElementDispatchTest.java?rev=1697514&r1=1697513&r2=1697514&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/OMElementDispatchTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/OMElementDispatchTest.java
 Mon Aug 24 23:07:14 2015
@@ -19,6 +19,8 @@
 
 package org.apache.axis2.jaxws.dispatch;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
@@ -367,12 +369,12 @@ public class OMElementDispatchTest exten
 
             // At this point, the payload should be an OMSourcedElement
             // that was created from the ParsedEntityReader's stream
-            assertTrue(payload instanceof OMSourcedElement);
+            assertThat(payload).isInstanceOf(OMSourcedElement.class);
 
 
             // Check to make sure the contents of the message are correct
             String responseText = payload.toStringWithConsume();
-            assertTrue(responseText.contains("TEST RESPONSE"));
+            assertThat(responseText).contains("TEST RESPONSE");
         } finally {
             
             // Uninstall the Test ParsedEntityReader

Modified: axis/axis2/java/core/trunk/modules/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/parent/pom.xml?rev=1697514&r1=1697513&r2=1697514&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/parent/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/parent/pom.xml Mon Aug 24 23:07:14 2015
@@ -625,6 +625,11 @@
                 <version>${axiom.version}</version>
             </dependency>
             <dependency>
+                <groupId>org.apache.ws.commons.axiom</groupId>
+                <artifactId>xml-truth</artifactId>
+                <version>${axiom.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>org.apache.ws.xmlschema</groupId>
                 <artifactId>xmlschema-core</artifactId>
                 <version>${xmlschema.version}</version>


Reply via email to