ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1604865 - in /webservices/axiom/trunk: modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java testsuites/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPElementType.java
Date Mon, 23 Jun 2014 16:25:03 GMT
Author: veithen
Date: Mon Jun 23 16:25:03 2014
New Revision: 1604865

URL: http://svn.apache.org/r1604865
Log:
Move the list of SOAPElementType instances to SOAPElementType.

Modified:
    webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
    webservices/axiom/trunk/testsuites/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPElementType.java

Modified: webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java?rev=1604865&r1=1604864&r2=1604865&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
(original)
+++ webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
Mon Jun 23 16:25:03 2014
@@ -72,20 +72,6 @@ public class SOAPTestSuiteBuilder extend
         new QName(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, "NoFault", SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX),
         new QName(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, "NoFault", SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX)
};
     
-    private static final SOAPElementType[] soapElementTypes = {
-        SOAPElementType.ENVELOPE,
-        SOAPElementType.HEADER,
-        SOAPElementType.BODY,
-        SOAPFaultChild.CODE,
-        SOAPElementType.VALUE,
-        SOAPElementType.SUB_CODE,
-        SOAPFaultChild.REASON,
-        SOAPElementType.TEXT,
-        SOAPFaultChild.NODE,
-        SOAPFaultChild.ROLE,
-        SOAPFaultChild.DETAIL,
-    };
-    
     private static final BooleanAttribute[] booleanAttributes = {
         BooleanAttribute.MUST_UNDERSTAND,
         BooleanAttribute.RELAY,
@@ -184,8 +170,8 @@ public class SOAPTestSuiteBuilder extend
         }
         addTest(new org.apache.axiom.ts.soap.factory.TestCreateDefaultSOAPMessage(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.factory.TestCreateSOAPEnvelopeWithCustomPrefix(metaFactory,
spec));
-        for (int i=0; i<soapElementTypes.length; i++) {
-            addTest(new org.apache.axiom.ts.soap.factory.TestCreateSOAPElement(metaFactory,
spec, soapElementTypes[i]));
+        for (SOAPElementType type : SOAPElementType.getAll()) {
+            addTest(new org.apache.axiom.ts.soap.factory.TestCreateSOAPElement(metaFactory,
spec, type));
         }
         addTest(new org.apache.axiom.ts.soap.factory.TestCreateSOAPFaultWithParent(metaFactory,
spec));
         addTest(new org.apache.axiom.ts.soap.factory.TestFactoryIsSingleton(metaFactory,
spec));

Modified: webservices/axiom/trunk/testsuites/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPElementType.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPElementType.java?rev=1604865&r1=1604864&r2=1604865&view=diff
==============================================================================
--- webservices/axiom/trunk/testsuites/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPElementType.java
(original)
+++ webservices/axiom/trunk/testsuites/soap-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPElementType.java
Mon Jun 23 16:25:03 2014
@@ -57,8 +57,26 @@ public abstract class SOAPElementType ex
         }
     };
     
+    private static final SOAPElementType[] allTypes = {
+        SOAPElementType.ENVELOPE,
+        SOAPElementType.HEADER,
+        SOAPElementType.BODY,
+        SOAPFaultChild.CODE,
+        SOAPElementType.VALUE,
+        SOAPElementType.SUB_CODE,
+        SOAPFaultChild.REASON,
+        SOAPElementType.TEXT,
+        SOAPFaultChild.NODE,
+        SOAPFaultChild.ROLE,
+        SOAPFaultChild.DETAIL,
+    };
+    
     SOAPElementType() {}
     
+    public static SOAPElementType[] getAll() {
+        return allTypes.clone();
+    }
+    
     /**
      * Get the qualified name for this element type in the given SOAP version.
      * 



Mime
View raw message