ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1719734 - in /webservices/axiom/trunk/testing: axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/ axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/ axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/header/ axiom-te...
Date Sat, 12 Dec 2015 20:39:58 GMT
Author: veithen
Date: Sat Dec 12 20:39:58 2015
New Revision: 1719734

URL: http://svn.apache.org/viewvc?rev=1719734&view=rev
Log:
Unify TestGetHeaderBlocksWithNSURIWithParser.

Added:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeaderBlocksWithNSURIWithParser.java
  (with props)
    webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/headers.xml
      - copied, changed from r1719718, webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/roles.xml
Removed:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/header/
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/header/TestGetHeaderBlocksWithNSURIWithParser.java
    webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/roles.xml
Modified:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineHeaderBlocksWithParser.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithParser.java
    webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java?rev=1719734&r1=1719733&r2=1719734&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
Sat Dec 12 20:39:58 2015
@@ -239,6 +239,7 @@ public class SOAPTestSuiteBuilder extend
         addTest(new org.apache.axiom.ts.soap.header.TestExamineMustUnderstandHeaderBlocksWithParser(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.header.TestExtractAllHeaderBlocks(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.header.TestGetHeaderBlocksWithNSURI(metaFactory,
spec));
+        addTest(new org.apache.axiom.ts.soap.header.TestGetHeaderBlocksWithNSURIWithParser(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.header.TestGetHeadersToProcessWithNamespace(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.header.TestGetHeadersToProcessWithParser(metaFactory,
spec));
         for (HeaderBlockAttribute attribute : getInstances(HeaderBlockAttribute.class)) {
@@ -336,7 +337,6 @@ public class SOAPTestSuiteBuilder extend
         addTest(new org.apache.axiom.ts.soap11.faultreason.TestAddSOAPText(metaFactory));
         addTest(new org.apache.axiom.ts.soap11.faultreason.TestGetFirstSOAPText(metaFactory));
         addTest(new org.apache.axiom.ts.soap11.faultreason.TestGetTextWithCDATA(metaFactory));
-        addTest(new org.apache.axiom.ts.soap11.header.TestGetHeaderBlocksWithNSURIWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap11.headerblock.TestGetMustUnderstandWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap11.headerblock.TestGetRoleWithParser(metaFactory));
         if (supportsOMSourcedElement) {
@@ -368,7 +368,6 @@ public class SOAPTestSuiteBuilder extend
         addTest(new org.apache.axiom.ts.soap12.faultsubcode.TestGetValueWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.faulttext.TestGetLangWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.header.TestExamineMustUnderstandHeaderBlocks(metaFactory));
-        addTest(new org.apache.axiom.ts.soap12.header.TestGetHeaderBlocksWithNSURIWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.headerblock.TestGetMustUnderstandWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.headerblock.TestGetRelayWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.headerblock.TestGetRoleWithParser(metaFactory));

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineHeaderBlocksWithParser.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineHeaderBlocksWithParser.java?rev=1719734&r1=1719733&r2=1719734&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineHeaderBlocksWithParser.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineHeaderBlocksWithParser.java
Sat Dec 12 20:39:58 2015
@@ -33,7 +33,7 @@ import org.apache.axiom.ts.soap.SampleBa
 
 public class TestExamineHeaderBlocksWithParser extends SampleBasedSOAPTestCase {
     public TestExamineHeaderBlocksWithParser(OMMetaFactory metaFactory, SOAPSpec spec) {
-        super(metaFactory, spec, SOAPSampleSet.ROLES);
+        super(metaFactory, spec, SOAPSampleSet.HEADERS);
     }
 
     @Override

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineMustUnderstandHeaderBlocksWithParser.java?rev=1719734&r1=1719733&r2=1719734&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
Sat Dec 12 20:39:58 2015
@@ -33,7 +33,7 @@ import org.apache.axiom.ts.soap.SampleBa
 
 public class TestExamineMustUnderstandHeaderBlocksWithParser extends SampleBasedSOAPTestCase
{
     public TestExamineMustUnderstandHeaderBlocksWithParser(OMMetaFactory metaFactory, SOAPSpec
spec) {
-        super(metaFactory, spec, SOAPSampleSet.ROLES);
+        super(metaFactory, spec, SOAPSampleSet.HEADERS);
     }
 
     @Override

Added: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeaderBlocksWithNSURIWithParser.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeaderBlocksWithNSURIWithParser.java?rev=1719734&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeaderBlocksWithNSURIWithParser.java
(added)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeaderBlocksWithNSURIWithParser.java
Sat Dec 12 20:39:58 2015
@@ -0,0 +1,46 @@
+/*
+ * 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.header;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import java.util.ArrayList;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPHeaderBlock;
+import org.apache.axiom.ts.soap.SOAPSampleSet;
+import org.apache.axiom.ts.soap.SOAPSpec;
+import org.apache.axiom.ts.soap.SampleBasedSOAPTestCase;
+
+public class TestGetHeaderBlocksWithNSURIWithParser extends SampleBasedSOAPTestCase {
+    public TestGetHeaderBlocksWithNSURIWithParser(OMMetaFactory metaFactory, SOAPSpec spec)
{
+        super(metaFactory, spec, SOAPSampleSet.HEADERS);
+    }
+
+    @Override
+    protected void runTest(SOAPEnvelope envelope) throws Throwable {
+        ArrayList headerBlocks = envelope.getHeader().getHeaderBlocksWithNSURI("urn:ns2");
+        assertThat(headerBlocks).hasSize(2);
+        assertThat(((SOAPHeaderBlock)headerBlocks.get(0)).getQName()).isEqualTo(new QName("urn:ns2",
"h4"));
+        assertThat(((SOAPHeaderBlock)headerBlocks.get(1)).getQName()).isEqualTo(new QName("urn:ns2",
"h6"));
+    }
+}

Propchange: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeaderBlocksWithNSURIWithParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithParser.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithParser.java?rev=1719734&r1=1719733&r2=1719734&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithParser.java
(original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithParser.java
Sat Dec 12 20:39:58 2015
@@ -32,7 +32,7 @@ import org.apache.axiom.om.OMMetaFactory
 
 public class TestGetHeadersToProcessWithParser extends SampleBasedSOAPTestCase {
     public TestGetHeadersToProcessWithParser(OMMetaFactory metaFactory, SOAPSpec spec) {
-        super(metaFactory, spec, SOAPSampleSet.ROLES);
+        super(metaFactory, spec, SOAPSampleSet.HEADERS);
     }
 
     protected void runTest(SOAPEnvelope envelope) throws Throwable {

Modified: webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java?rev=1719734&r1=1719733&r2=1719734&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java
(original)
+++ webservices/axiom/trunk/testing/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPSampleSet.java
Sat Dec 12 20:39:58 2015
@@ -66,9 +66,9 @@ public final class SOAPSampleSet extends
     public static final SOAPSampleSet FAULT_DETAIL_DEFAULT_NAMESPACE = new SOAPSampleSet("fault-detail-default-namespace");
     
     /**
-     * A SOAP request with header blocks configured with different roles.
+     * A SOAP request with header blocks with varying characteristics.
      */
-    public static final SOAPSampleSet ROLES = new SOAPSampleSet("roles");
+    public static final SOAPSampleSet HEADERS = new SOAPSampleSet("headers");
     
     private final SOAPSample soap11Message;
     private final SOAPSample soap12Message;

Copied: webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/headers.xml
(from r1719718, webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/roles.xml)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/headers.xml?p2=webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/headers.xml&p1=webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/roles.xml&r1=1719718&r2=1719734&rev=1719734&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/roles.xml
(original)
+++ webservices/axiom/trunk/testing/soap-testsuite/src/main/resources/test-message/set/headers.xml
Sat Dec 12 20:39:58 2015
@@ -1,5 +1,5 @@
 <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xml="http://www.w3.org/XML/1998/namespace">
-    <env:Header xmlns:test="http://example.org/RoleTest">
+    <env:Header xmlns:test="http://example.org/RoleTest" xmlns:ns2="urn:ns2">
         <test:h1 env:role="http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"
                 env:mustUnderstand="true">
             Going all the way baby!
@@ -12,15 +12,15 @@
                 env:mustUnderstand="1">
             Please don't process me!
         </test:h3>
-        <test:h4 env:role="http://example.org/myCustomRole">
+        <ns2:h4 env:role="http://example.org/myCustomRole">
             I'm only going to special, customized places.
-        </test:h4>
+        </ns2:h4>
         <test:h5>
             Going all the way baby! (no role)
         </test:h5>
-        <test:h6 env:role="">
+        <ns2:h6 env:role="">
             Going all the way baby! (empty role)
-        </test:h6>
+        </ns2:h6>
         <test:h7 env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
                 env:mustUnderstand="true">
             Another header for the next node.



Mime
View raw message