ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1719720 - in /webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts: soap/ soap/header/ soap11/header/ soap12/header/
Date Sat, 12 Dec 2015 19:03:26 GMT
Author: veithen
Date: Sat Dec 12 19:03:26 2015
New Revision: 1719720

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

Added:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
  (with props)
Removed:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
Modified:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.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=1719720&r1=1719719&r2=1719720&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 19:03:26 2015
@@ -236,6 +236,7 @@ public class SOAPTestSuiteBuilder extend
         addTest(new org.apache.axiom.ts.soap.header.TestExamineAllHeaderBlocksWithParser(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.header.TestExamineHeaderBlocks(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.header.TestExamineHeaderBlocksWithParser(metaFactory,
spec));
+        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.TestGetHeadersToProcessWithNamespace(metaFactory,
spec));
@@ -335,7 +336,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.TestExamineMustUnderstandHeaderBlocksWithParser(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));
@@ -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.TestExamineMustUnderstandHeaderBlocksWithParser(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));

Added: 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=1719720&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
(added)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestExamineMustUnderstandHeaderBlocksWithParser.java
Sat Dec 12 19:03:26 2015
@@ -0,0 +1,49 @@
+/*
+ * 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.Iterator;
+
+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 TestExamineMustUnderstandHeaderBlocksWithParser extends SampleBasedSOAPTestCase
{
+    public TestExamineMustUnderstandHeaderBlocksWithParser(OMMetaFactory metaFactory, SOAPSpec
spec) {
+        super(metaFactory, spec, SOAPSampleSet.ROLES);
+    }
+
+    @Override
+    protected void runTest(SOAPEnvelope envelope) throws Throwable {
+        String roleNextURI = spec.getNextRoleURI();
+        Iterator it = envelope.getHeader().examineMustUnderstandHeaderBlocks(roleNextURI);
+        assertThat(it.hasNext()).isTrue();
+        SOAPHeaderBlock headerBlock = (SOAPHeaderBlock)it.next();
+        assertThat(headerBlock.getQName()).isEqualTo(new QName("http://example.org/RoleTest",
"h7"));
+        assertThat(headerBlock.getRole()).isEqualTo(roleNextURI);
+        assertThat(it.hasNext()).isFalse();
+    }
+}

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



Mime
View raw message