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 2015/05/31 14:22:36 UTC

svn commit: r1682726 - in /webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts: soap/header/ soap11/header/ soap12/header/

Author: veithen
Date: Sun May 31 12:22:35 2015
New Revision: 1682726

URL: http://svn.apache.org/r1682726
Log:
Eliminate SOAPRoleTest base class.

Added:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/MyRolePlayer.java   (with props)
Removed:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/SOAPRoleTest.java
Modified:
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithNamespace.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/header/TestGetHeadersToProcessWithParser.java
    webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/header/TestGetHeadersToProcessWithParser.java

Added: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/MyRolePlayer.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/MyRolePlayer.java?rev=1682726&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/MyRolePlayer.java (added)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/MyRolePlayer.java Sun May 31 12:22:35 2015
@@ -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.soap.header;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.axiom.soap.RolePlayer;
+
+public final class MyRolePlayer implements RolePlayer {
+    public static final String CUSTOM_ROLE = "http://example.org/myCustomRole";
+
+    boolean ultimateReceiver;
+    List roles;
+    public MyRolePlayer(boolean ultimateReceiver) {
+        this.ultimateReceiver = ultimateReceiver;
+        roles = null;
+    }
+
+    public MyRolePlayer(boolean ultimateReceiver, String [] roles) {
+        this.ultimateReceiver = ultimateReceiver;
+        this.roles = new ArrayList();
+        for (int i = 0; i < roles.length; i++) {
+            this.roles.add(roles[i]);
+        }
+    }
+
+    public List getRoles() {
+        return roles;
+    }
+
+    public boolean isUltimateDestination() {
+        return ultimateReceiver;
+    }
+}
\ No newline at end of file

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

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithNamespace.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithNamespace.java?rev=1682726&r1=1682725&r2=1682726&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithNamespace.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/header/TestGetHeadersToProcessWithNamespace.java Sun May 31 12:22:35 2015
@@ -27,11 +27,12 @@ import org.apache.axiom.soap.SOAPEnvelop
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axiom.ts.soap.SOAPSpec;
+import org.apache.axiom.ts.soap.SOAPTestCase;
 
 /**
  * Tests the behavior of {@link SOAPHeader#getHeadersToProcess(RolePlayer, String)}
  */
-public class TestGetHeadersToProcessWithNamespace extends SOAPRoleTest {
+public class TestGetHeadersToProcessWithNamespace extends SOAPTestCase {
     public TestGetHeadersToProcessWithNamespace(OMMetaFactory metaFactory, SOAPSpec spec) {
         super(metaFactory, spec);
     }

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/header/TestGetHeadersToProcessWithParser.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/header/TestGetHeadersToProcessWithParser.java?rev=1682726&r1=1682725&r2=1682726&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/header/TestGetHeadersToProcessWithParser.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap11/header/TestGetHeadersToProcessWithParser.java Sun May 31 12:22:35 2015
@@ -26,10 +26,11 @@ import org.apache.axiom.soap.SOAPEnvelop
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.header.SOAPRoleTest;
+import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.header.MyRolePlayer;
 import org.apache.axiom.om.OMMetaFactory;
 
-public class TestGetHeadersToProcessWithParser extends SOAPRoleTest {
+public class TestGetHeadersToProcessWithParser extends SOAPTestCase {
     public TestGetHeadersToProcessWithParser(OMMetaFactory metaFactory) {
         super(metaFactory, SOAPSpec.SOAP11);
     }
@@ -38,7 +39,7 @@ public class TestGetHeadersToProcessWith
         SOAPEnvelope env = getTestMessage("roleMessage.xml");
         SOAPHeader soapHeader = env.getHeader();
 
-        String roles [] = { CUSTOM_ROLE };
+        String roles [] = { MyRolePlayer.CUSTOM_ROLE };
         RolePlayer rp = new MyRolePlayer(true, roles);
 
         Iterator headers = soapHeader.getHeadersToProcess(rp);

Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/header/TestGetHeadersToProcessWithParser.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/header/TestGetHeadersToProcessWithParser.java?rev=1682726&r1=1682725&r2=1682726&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/header/TestGetHeadersToProcessWithParser.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/header/TestGetHeadersToProcessWithParser.java Sun May 31 12:22:35 2015
@@ -26,10 +26,11 @@ import org.apache.axiom.soap.SOAPEnvelop
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axiom.ts.soap.SOAPSpec;
-import org.apache.axiom.ts.soap.header.SOAPRoleTest;
+import org.apache.axiom.ts.soap.SOAPTestCase;
+import org.apache.axiom.ts.soap.header.MyRolePlayer;
 import org.apache.axiom.om.OMMetaFactory;
 
-public class TestGetHeadersToProcessWithParser extends SOAPRoleTest {
+public class TestGetHeadersToProcessWithParser extends SOAPTestCase {
     public TestGetHeadersToProcessWithParser(OMMetaFactory metaFactory) {
         super(metaFactory, SOAPSpec.SOAP12);
     }
@@ -38,7 +39,7 @@ public class TestGetHeadersToProcessWith
         SOAPEnvelope env = getTestMessage("roleMessage.xml");
         SOAPHeader soapHeader = env.getHeader();
 
-        String roles [] = { CUSTOM_ROLE };
+        String roles [] = { MyRolePlayer.CUSTOM_ROLE };
         RolePlayer rp = new MyRolePlayer(true, roles);
 
         Iterator headers = soapHeader.getHeadersToProcess(rp);