ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1547521 - in /webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts: om/OMTestSuiteBuilder.java om/element/TestCloneOMElement.java soap/SOAPTestSuiteBuilder.java soap/body/TestCloneOMElement.java
Date Tue, 03 Dec 2013 18:42:11 GMT
Author: veithen
Date: Tue Dec  3 18:42:11 2013
New Revision: 1547521

URL: http://svn.apache.org/r1547521
Log:
Some fixes to TestCloneOMElement

 - Since the test case uses SOAP, it should go to SOAPTestSuiteBuilder.

 - Added assertions that check that cloning a SOAPBody produces a plain
   OMElement.

Added:
    webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestCloneOMElement.java
  (contents, props changed)
      - copied, changed from r1547520, webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement.java
Removed:
    webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement.java
Modified:
    webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
    webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java

Modified: webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java?rev=1547521&r1=1547520&r2=1547521&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
(original)
+++ webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.java
Tue Dec  3 18:42:11 2013
@@ -197,7 +197,6 @@ public class OMTestSuiteBuilder extends 
         addTest(new org.apache.axiom.ts.om.element.TestBuildDiscarded(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestChildReDeclaringGrandParentsDefaultNSWithPrefix(metaFactory));
         addTest(new org.apache.axiom.ts.om.element.TestChildReDeclaringParentsDefaultNSWithPrefix(metaFactory));
-        addTest(new org.apache.axiom.ts.om.element.TestCloneOMElement(metaFactory));
         for (int i=0; i<conformanceFiles.length; i++) {
             ConformanceTestFile file = conformanceFiles[i];
             if (!file.hasEntityReferences()) {

Modified: webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java?rev=1547521&r1=1547520&r2=1547521&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
(original)
+++ webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
Tue Dec  3 18:42:11 2013
@@ -92,6 +92,7 @@ public class SOAPTestSuiteBuilder extend
         SerializationStrategy[] serializationStrategies = Strategies.getSerializationStrategies();
         addTest(new org.apache.axiom.ts.soap.body.TestAddFault1(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.body.TestAddFault2(metaFactory, spec));
+        addTest(new org.apache.axiom.ts.soap.body.TestCloneOMElement(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.body.TestGetFault(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.body.TestGetFaultFakeFault(metaFactory, spec));
         addTest(new org.apache.axiom.ts.soap.body.TestGetFaultWithParser(metaFactory, spec));

Copied: webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestCloneOMElement.java
(from r1547520, webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestCloneOMElement.java?p2=webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestCloneOMElement.java&p1=webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement.java&r1=1547520&r2=1547521&rev=1547521&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestCloneOMElement.java
(original)
+++ webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestCloneOMElement.java
Tue Dec  3 18:42:11 2013
@@ -16,31 +16,32 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.ts.om.element;
+package org.apache.axiom.ts.soap.body;
 
-import org.apache.axiom.om.AbstractTestCase;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.om.OMXMLBuilderFactory;
-import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axiom.ts.AxiomTestCase;
+import org.apache.axiom.ts.soap.SOAPSpec;
+import org.apache.axiom.ts.soap.SOAPTestCase;
 import org.custommonkey.xmlunit.XMLAssert;
 
-public class TestCloneOMElement extends AxiomTestCase {
-    public TestCloneOMElement(OMMetaFactory metaFactory) {
-        super(metaFactory);
+public class TestCloneOMElement extends SOAPTestCase {
+    public TestCloneOMElement(OMMetaFactory metaFactory, SOAPSpec spec) {
+        super(metaFactory, spec);
     }
 
     protected void runTest() throws Throwable {
-        SOAPEnvelope soapEnvelope = OMXMLBuilderFactory.createSOAPModelBuilder(metaFactory,
-                AbstractTestCase.getTestResource(TestConstants.SOAP_SOAPMESSAGE), null).getSOAPEnvelope();
+        SOAPEnvelope soapEnvelope = getTestMessage(SOAP_MESSAGE);
         SOAPBody body = soapEnvelope.getBody();
 
         OMElement firstClonedBodyElement = body.cloneOMElement();
         OMElement secondClonedBodyElement = body.cloneOMElement();
 
+        // cloneOMElement creates plain OMElements
+        assertFalse(firstClonedBodyElement instanceof SOAPBody);
+        assertFalse(secondClonedBodyElement instanceof SOAPBody);
+        
         // first check whether both have the same information
         XMLAssert.assertXMLEqual(body.toString(),
                                  firstClonedBodyElement.toString());

Propchange: webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/body/TestCloneOMElement.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message