You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2010/04/18 19:55:05 UTC
svn commit: r935373 - in /webservices/commons/trunk/modules/axiom/modules:
axiom-api/src/test/java/org/apache/axiom/soap/
axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/
axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/ axiom-tests/src/...
Author: veithen
Date: Sun Apr 18 17:55:04 2010
New Revision: 935373
URL: http://svn.apache.org/viewvc?rev=935373&view=rev
Log:
WSCOMMONS-419: Moved some test cases from axiom-tests to the appropriate modules.
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAP11FaultTestBase.java
- copied unchanged from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP11FaultTestBase.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java
- copied, changed from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultTestBase.java
- copied unchanged from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTestBase.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAP11FaultTest.java
- copied unchanged from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAP11FaultTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAP12FaultTest.java
- copied unchanged from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAP12FaultTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAP11FaultTest.java
- copied unchanged from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAP11FaultTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java
- copied, changed from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java
Removed:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP11FaultTestBase.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPFaultTestBase.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAP11FaultTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/dom/SOAP12FaultTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAP11FaultTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java
Copied: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java (from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java)
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java&p1=webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java&r1=935365&r2=935373&rev=935373&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAP12FaultTestBase.java Sun Apr 18 17:55:04 2010
@@ -19,7 +19,6 @@
package org.apache.axiom.soap;
-import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMMetaFactory;
public class SOAP12FaultTestBase extends SOAPFaultTestBase {
@@ -73,43 +72,4 @@ public class SOAP12FaultTestBase extends
soapFaultWithParser.getNode().getLocalName().equals(
SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
}
-
-
- public void testMoreChildrenAddition() {
- SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory();
- SOAPEnvelope envelope = soapFactory.getDefaultFaultEnvelope();
-
- assertNotNull("Default FaultEnvelope must have a SOAPFault in it",
- envelope.getBody().getFault());
- assertNotNull(
- "Default FaultEnvelope must have a SOAPFaultCode in it",
- envelope.getBody().getFault().getCode());
- assertNotNull(
- "Default FaultEnvelope must have a SOAPFaultCodeValue in it",
- envelope.getBody().getFault().getCode().getValue());
- assertNotNull(
- "Default FaultEnvelope must have a SOAPFaultReason in it",
- envelope.getBody().getFault().getReason());
- assertNotNull(
- "Default FaultEnvelope must have a SOAPFaultText in it",
- envelope.getBody().getFault().getReason().getFirstSOAPText());
-
- SOAPEnvelope soapEnvelope = soapFactory.getDefaultFaultEnvelope();
- String errorCodeString = "Some Error occurred !!";
- soapEnvelope.getBody().getFault().getCode().getValue().setText(
- errorCodeString);
-
- SOAPFaultCode code = soapEnvelope.getBody().getFault().getCode();
- envelope.getBody().getFault().setCode(code);
-
- assertTrue("Parent Value of Code has not been set to new fault",
- code.getParent() == envelope.getBody().getFault());
- assertTrue("Parent Value of Code is still pointing to old fault",
- code.getParent() != soapEnvelope.getBody().getFault());
- assertNull("Old fault must not have a fault code",
- soapEnvelope.getBody().getFault().getCode());
- assertEquals("The SOAP Code value must be " + errorCodeString,
- errorCodeString,
- envelope.getBody().getFault().getCode().getValue().getText());
- }
}
\ No newline at end of file
Copied: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java (from r935365, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java)
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java&p1=webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java&r1=935365&r2=935373&rev=935373&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAP12FaultTest.java Sun Apr 18 17:55:04 2010
@@ -21,9 +21,51 @@ package org.apache.axiom.soap.impl.llom;
import org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory;
import org.apache.axiom.soap.SOAP12FaultTestBase;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFaultCode;
public class SOAP12FaultTest extends SOAP12FaultTestBase {
public SOAP12FaultTest() {
super(new OMLinkedListMetaFactory());
}
+
+ // TODO: the same test fails with DOOM; not sure if this is an issue in DOOM or if the test case is wrong
+ public void testMoreChildrenAddition() {
+ SOAPFactory soapFactory = omMetaFactory.getSOAP12Factory();
+ SOAPEnvelope envelope = soapFactory.getDefaultFaultEnvelope();
+
+ assertNotNull("Default FaultEnvelope must have a SOAPFault in it",
+ envelope.getBody().getFault());
+ assertNotNull(
+ "Default FaultEnvelope must have a SOAPFaultCode in it",
+ envelope.getBody().getFault().getCode());
+ assertNotNull(
+ "Default FaultEnvelope must have a SOAPFaultCodeValue in it",
+ envelope.getBody().getFault().getCode().getValue());
+ assertNotNull(
+ "Default FaultEnvelope must have a SOAPFaultReason in it",
+ envelope.getBody().getFault().getReason());
+ assertNotNull(
+ "Default FaultEnvelope must have a SOAPFaultText in it",
+ envelope.getBody().getFault().getReason().getFirstSOAPText());
+
+ SOAPEnvelope soapEnvelope = soapFactory.getDefaultFaultEnvelope();
+ String errorCodeString = "Some Error occurred !!";
+ soapEnvelope.getBody().getFault().getCode().getValue().setText(
+ errorCodeString);
+
+ SOAPFaultCode code = soapEnvelope.getBody().getFault().getCode();
+ envelope.getBody().getFault().setCode(code);
+
+ assertTrue("Parent Value of Code has not been set to new fault",
+ code.getParent() == envelope.getBody().getFault());
+ assertTrue("Parent Value of Code is still pointing to old fault",
+ code.getParent() != soapEnvelope.getBody().getFault());
+ assertNull("Old fault must not have a fault code",
+ soapEnvelope.getBody().getFault().getCode());
+ assertEquals("The SOAP Code value must be " + errorCodeString,
+ errorCodeString,
+ envelope.getBody().getFault().getCode().getValue().getText());
+ }
}