You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2011/01/16 08:42:02 UTC
svn commit: r1059506 - in
/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts:
SOAPTestSuiteBuilder.java
soap/envelope/TestGetSOAPBodyFirstElementLocalNameAndNS.java
Author: veithen
Date: Sun Jan 16 07:42:01 2011
New Revision: 1059506
URL: http://svn.apache.org/viewvc?rev=1059506&view=rev
Log:
Added a simple unit test for SOAPEnvelope#getSOAPBodyFirstElementLocalName() and SOAPEnvelope#getSOAPBodyFirstElementNS().
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestGetSOAPBodyFirstElementLocalNameAndNS.java (with props)
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java?rev=1059506&r1=1059505&r2=1059506&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java Sun Jan 16 07:42:01 2011
@@ -43,6 +43,7 @@ public class SOAPTestSuiteBuilder extend
addTest(new org.apache.axiom.ts.soap.envelope.TestGetBodyWithParser(metaFactory, envelopeNamespaceURI));
addTest(new org.apache.axiom.ts.soap.envelope.TestGetHeader(metaFactory, envelopeNamespaceURI));
addTest(new org.apache.axiom.ts.soap.envelope.TestGetHeaderWithParser(metaFactory, envelopeNamespaceURI));
+ addTest(new org.apache.axiom.ts.soap.envelope.TestGetSOAPBodyFirstElementLocalNameAndNS(metaFactory, envelopeNamespaceURI));
addTest(new org.apache.axiom.ts.soap.faultdetail.TestAddDetailEntry(metaFactory, envelopeNamespaceURI));
addTest(new org.apache.axiom.ts.soap.faultdetail.TestGetAllDetailEntries(metaFactory, envelopeNamespaceURI));
addTest(new org.apache.axiom.ts.soap.faultdetail.TestGetAllDetailEntriesWithParser(metaFactory, envelopeNamespaceURI));
Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestGetSOAPBodyFirstElementLocalNameAndNS.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestGetSOAPBodyFirstElementLocalNameAndNS.java?rev=1059506&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestGetSOAPBodyFirstElementLocalNameAndNS.java (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestGetSOAPBodyFirstElementLocalNameAndNS.java Sun Jan 16 07:42:01 2011
@@ -0,0 +1,38 @@
+/*
+ * 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.soap.envelope;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.ts.soap.SOAPTestCase;
+
+public class TestGetSOAPBodyFirstElementLocalNameAndNS extends SOAPTestCase {
+ public TestGetSOAPBodyFirstElementLocalNameAndNS(OMMetaFactory metaFactory, String envelopeNamespaceURI) {
+ super(metaFactory, envelopeNamespaceURI);
+ }
+
+ protected void runTest() throws Throwable {
+ SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
+ OMElement bodyElement = soapFactory.createOMElement("myOperation", "urn:ns", "ns");
+ envelope.getBody().addChild(bodyElement);
+ assertEquals(bodyElement.getLocalName(), envelope.getSOAPBodyFirstElementLocalName());
+ assertEquals(bodyElement.getNamespace(), envelope.getSOAPBodyFirstElementNS());
+ }
+}
Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestGetSOAPBodyFirstElementLocalNameAndNS.java
------------------------------------------------------------------------------
svn:eol-style = native