Author: alessio.soldano(a)jboss.com
Date: 2009-05-28 05:18:31 -0400 (Thu, 28 May 2009)
New Revision: 10131
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousDispatchTestCase.java
Log:
[CXF-2190] Minor change to the test
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousDispatchTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousDispatchTestCase.java 2009-05-28
09:17:44 UTC (rev 10130)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/asynchronous/AsynchronousDispatchTestCase.java 2009-05-28
09:18:31 UTC (rev 10131)
@@ -39,10 +39,9 @@
import junit.framework.Test;
+import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
-import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.common.DOMWriter;
import org.w3c.dom.Element;
/**
@@ -55,7 +54,6 @@
{
private String targetNS = "http://org.jboss.ws/jaxws/asynchronous";
private String reqPayload = "<ns2:echo xmlns:ns2='" + targetNS +
"'><String_1>Hello</String_1></ns2:echo>";
- private String expPayload = "<ns2:echoResponse xmlns:ns2='" +
targetNS +
"'><result>Hello</result></ns2:echoResponse>";
private Exception handlerException;
private boolean asyncHandlerCalled;
@@ -110,8 +108,9 @@
private void verifyResponse(Source result) throws IOException
{
- Element resElement = DOMUtils.sourceToElement(result);
- String resStr = DOMWriter.printNode(resElement, false);
- assertTrue("Unexpected response: " + resStr,
resStr.contains("<result>Hello</result>"));
+ Element docElement = DOMUtils.sourceToElement(result);
+ Element retElement = DOMUtils.getFirstChildElement(docElement);
+ assertEquals("result", retElement.getNodeName());
+ assertEquals("Hello", retElement.getTextContent());
}
}
Show replies by date