ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1609864 - in /webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj: ./ body/ element/ header/
Date Fri, 11 Jul 2014 23:02:54 GMT
Author: veithen
Date: Fri Jul 11 23:02:53 2014
New Revision: 1609864

URL: http://svn.apache.org/r1609864
Log:
More SAAJ tests.

Added:
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/body/
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/body/TestAddChildElementReification.java
  (with props)
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestGetOwnerDocument.java
      - copied, changed from r1609555, webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestGetOwnerDocument.java
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestSetParentElement.java
      - copied, changed from r1609335, webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestSetParentElement.java
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/header/
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/header/TestExamineMustUnderstandHeaderElements.java
      - copied, changed from r1609306, webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestExamineMustUnderstandHeaderElements.java
Removed:
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestExamineMustUnderstandHeaderElements.java
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestGetOwnerDocument.java
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestSetParentElement.java
Modified:
    webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/SAAJTestSuiteBuilder.java

Modified: webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/SAAJTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/SAAJTestSuiteBuilder.java?rev=1609864&r1=1609863&r2=1609864&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/SAAJTestSuiteBuilder.java
(original)
+++ webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/SAAJTestSuiteBuilder.java
Fri Jul 11 23:02:53 2014
@@ -22,6 +22,10 @@ import javax.xml.soap.SAAJMetaFactory;
 import javax.xml.soap.SOAPConstants;
 
 import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
+import org.apache.axiom.ts.saaj.body.TestAddChildElementReification;
+import org.apache.axiom.ts.saaj.element.TestGetOwnerDocument;
+import org.apache.axiom.ts.saaj.element.TestSetParentElement;
+import org.apache.axiom.ts.saaj.header.TestExamineMustUnderstandHeaderElements;
 import org.apache.axiom.ts.soap.SOAPSpec;
 
 public class SAAJTestSuiteBuilder extends MatrixTestSuiteBuilder {
@@ -43,5 +47,7 @@ public class SAAJTestSuiteBuilder extend
         addTest(new TestGetOwnerDocument(saajImplementation, SOAPConstants.SOAP_1_1_PROTOCOL));
         addTest(new TestGetOwnerDocument(saajImplementation, SOAPConstants.SOAP_1_2_PROTOCOL));
         addTest(new TestGetOwnerDocument(saajImplementation, SOAPConstants.DYNAMIC_SOAP_PROTOCOL));
+        addTest(new TestAddChildElementReification(saajImplementation, SOAPSpec.SOAP11));
+        addTest(new TestAddChildElementReification(saajImplementation, SOAPSpec.SOAP12));
     }
 }

Added: webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/body/TestAddChildElementReification.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/body/TestAddChildElementReification.java?rev=1609864&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/body/TestAddChildElementReification.java
(added)
+++ webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/body/TestAddChildElementReification.java
Fri Jul 11 23:02:53 2014
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.saaj.body;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPElement;
+
+import org.apache.axiom.ts.saaj.FactorySelector;
+import org.apache.axiom.ts.saaj.SAAJImplementation;
+import org.apache.axiom.ts.saaj.SAAJTestCase;
+import org.apache.axiom.ts.soap.SOAPSpec;
+
+public class TestAddChildElementReification extends SAAJTestCase {
+    private final SOAPSpec spec;
+
+    public TestAddChildElementReification(SAAJImplementation saajImplementation, SOAPSpec
spec) {
+        super(saajImplementation);
+        this.spec = spec;
+        addTestParameter("spec", spec.getName());
+    }
+
+    @Override
+    protected void runTest() throws Throwable {
+        MessageFactory mf = spec.getAdapter(FactorySelector.class).newMessageFactory(saajImplementation,
false);
+        SOAPBody body = mf.createMessage().getSOAPBody();
+        SOAPElement child = body.addChildElement((SOAPElement)body.getOwnerDocument().createElementNS("urn:test",
"p:test"));
+        assertThat(child, is(instanceOf(SOAPBodyElement.class)));
+    }
+}

Propchange: webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/body/TestAddChildElementReification.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestGetOwnerDocument.java
(from r1609555, webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestGetOwnerDocument.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestGetOwnerDocument.java?p2=webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestGetOwnerDocument.java&p1=webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestGetOwnerDocument.java&r1=1609555&r2=1609864&rev=1609864&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestGetOwnerDocument.java
(original)
+++ webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestGetOwnerDocument.java
Fri Jul 11 23:02:53 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.ts.saaj;
+package org.apache.axiom.ts.saaj.element;
 
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.is;
@@ -28,6 +28,8 @@ import javax.xml.soap.SOAPElement;
 import javax.xml.soap.SOAPFactory;
 import javax.xml.soap.SOAPPart;
 
+import org.apache.axiom.ts.saaj.SAAJImplementation;
+import org.apache.axiom.ts.saaj.SAAJTestCase;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 

Copied: webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestSetParentElement.java
(from r1609335, webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestSetParentElement.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestSetParentElement.java?p2=webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestSetParentElement.java&p1=webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestSetParentElement.java&r1=1609335&r2=1609864&rev=1609864&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestSetParentElement.java
(original)
+++ webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/element/TestSetParentElement.java
Fri Jul 11 23:02:53 2014
@@ -16,12 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.ts.saaj;
+package org.apache.axiom.ts.saaj.element;
 
 import javax.xml.namespace.QName;
 import javax.xml.soap.SOAPElement;
 import javax.xml.soap.SOAPFactory;
 
+import org.apache.axiom.ts.saaj.SAAJImplementation;
+import org.apache.axiom.ts.saaj.SAAJTestCase;
 import org.w3c.dom.NodeList;
 
 public class TestSetParentElement extends SAAJTestCase {

Copied: webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/header/TestExamineMustUnderstandHeaderElements.java
(from r1609306, webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestExamineMustUnderstandHeaderElements.java)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/header/TestExamineMustUnderstandHeaderElements.java?p2=webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/header/TestExamineMustUnderstandHeaderElements.java&p1=webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestExamineMustUnderstandHeaderElements.java&r1=1609306&r2=1609864&rev=1609864&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/TestExamineMustUnderstandHeaderElements.java
(original)
+++ webservices/axiom/trunk/testing/saaj-testsuite/src/main/java/org/apache/axiom/ts/saaj/header/TestExamineMustUnderstandHeaderElements.java
Fri Jul 11 23:02:53 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.ts.saaj;
+package org.apache.axiom.ts.saaj.header;
 
 import java.io.InputStream;
 import java.util.Iterator;
@@ -27,6 +27,9 @@ import javax.xml.soap.SOAPHeader;
 import javax.xml.soap.SOAPHeaderElement;
 import javax.xml.soap.SOAPMessage;
 
+import org.apache.axiom.ts.saaj.FactorySelector;
+import org.apache.axiom.ts.saaj.SAAJImplementation;
+import org.apache.axiom.ts.saaj.SAAJTestCase;
 import org.apache.axiom.ts.soap.SOAPSpec;
 import org.apache.axiom.ts.soap.TestMessageSet;
 



Mime
View raw message