You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2008/12/21 20:39:54 UTC

svn commit: r728482 - in /webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom: om/ om/factory/ om/impl/dom/ om/impl/serializer/ om/impl/streamwrapper/ soap/impl/llom/

Author: veithen
Date: Sun Dec 21 11:39:53 2008
New Revision: 728482

URL: http://svn.apache.org/viewvc?rev=728482&view=rev
Log:
Replaced string literals (with test message names) by constants when they are available in TestConstants.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/IteratorTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMCachingTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMDiscardTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/MessagesTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/ElementSerializerTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMSerializerTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OmStAXBuilderTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMEnvelopeTest.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/IteratorTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/IteratorTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/IteratorTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/IteratorTest.java Sun Dec 21 11:39:53 2008
@@ -43,7 +43,7 @@
                 new StAXOMBuilder(new OMLinkedListImplFactory(),
                                   XMLInputFactory.newInstance().createXMLStreamReader(
                                                   getTestResource(
-                                                          "soap/soapmessage1.xml")))
+                                                          TestConstants.SOAP_SOAPMESSAGE1)))
                         .getDocumentElement();
     }
 

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMCachingTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMCachingTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMCachingTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMCachingTest.java Sun Dec 21 11:39:53 2008
@@ -83,6 +83,6 @@
 
     private XMLStreamReader getXMLStreamReader() throws XMLStreamException, FileNotFoundException {
         return XMLInputFactory.newInstance().
-                createXMLStreamReader(getTestResource("soap/soapmessage.xml"));
+                createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE));
     }
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMDiscardTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMDiscardTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMDiscardTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/OMDiscardTest.java Sun Dec 21 11:39:53 2008
@@ -54,7 +54,7 @@
 
     private XMLStreamReader getXMLStreamReader() throws XMLStreamException, FileNotFoundException {
         return XMLInputFactory.newInstance().
-                createXMLStreamReader(getTestResource("soap/soapmessage.xml"));
+                createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE));
     }
 
 }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/factory/OMLinkedListImplFactoryTest.java Sun Dec 21 11:39:53 2008
@@ -27,6 +27,7 @@
 import org.apache.axiom.om.OMTestUtils;
 import org.apache.axiom.om.OMText;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPConstants;
@@ -66,7 +67,7 @@
 
     public void testCreateOMElement() throws Exception {
         OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
-                getTestResource("soap/whitespacedMessage.xml"));
+                getTestResource(TestConstants.WHITESPACE_MESSAGE));
         OMElement envelope = omBuilder.getDocumentElement();
         
         // The body is the second element
@@ -124,7 +125,7 @@
 
     public void testCreateSOAPBody() throws Exception {
         OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
-                getTestResource("soap/minimalMessage.xml"));
+                getTestResource(TestConstants.MINIMAL_MESSAGE));
         SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
         SOAPBody soapBodyOne = omFactory.createSOAPBody(soapEnvelope);
         assertTrue(
@@ -134,7 +135,7 @@
 
     public void testCreateSOAPBodyWithBuilder() throws Exception {
         OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
-                getTestResource("soap/minimalMessage.xml"));
+                getTestResource(TestConstants.MINIMAL_MESSAGE));
         SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
 
         SOAPBody soapBodyTwo = omFactory.createSOAPBody(soapEnvelope,
@@ -155,7 +156,7 @@
                 soapEnvelopeTwo.isComplete());
         SOAPEnvelope soapEnvelope = omFactory.createSOAPEnvelope(
                 OMTestUtils.getOMBuilder(
-                        getTestResource("soap/minimalMessage.xml")));
+                        getTestResource(TestConstants.MINIMAL_MESSAGE)));
         assertTrue(
                 "SOAPEnvelope with a builder should start with done = false ",
                 !soapEnvelope.isComplete());
@@ -164,7 +165,7 @@
 
     public void testCreateSOAPHeader() throws Exception {
         OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
-                getTestResource("soap/minimalMessage.xml"));
+                getTestResource(TestConstants.MINIMAL_MESSAGE));
         SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
         SOAPHeader soapHeader = omFactory.createSOAPHeader(soapEnvelope);
         assertTrue(
@@ -181,7 +182,7 @@
 
     public void testCreateSOAPHeaderBlock() throws Exception {
         OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
-                getTestResource("soap/soapmessage.xml"));
+                getTestResource(TestConstants.SOAP_SOAPMESSAGE));
         SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
         SOAPHeader soapHeader = soapEnvelope.getHeader();
         SOAPHeaderBlock soapHeaderBlock = omFactory.createSOAPHeaderBlock(
@@ -199,7 +200,7 @@
 
     public void testCreateSOAPFault() throws Exception {
         OMXMLParserWrapper omBuilder = OMTestUtils.getOMBuilder(
-                getTestResource("soap/soapmessage.xml"));
+                getTestResource(TestConstants.SOAP_SOAPMESSAGE));
         SOAPEnvelope soapEnvelope = (SOAPEnvelope) omBuilder.getDocumentElement();
         SOAPBody soapBody = soapEnvelope.getBody();
         SOAPFault soapFault = omFactory.createSOAPFault(soapBody,

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/MessagesTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/MessagesTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/MessagesTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/MessagesTest.java Sun Dec 21 11:39:53 2008
@@ -20,6 +20,7 @@
 package org.apache.axiom.om.impl.dom;
 
 import org.apache.axiom.om.OMException;
+import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.soap.SOAPEnvelope;
 
 public class MessagesTest extends OMDOMTestCase {
@@ -29,7 +30,7 @@
             Exception {
         soapEnvelope =
                 (SOAPEnvelope) OMTestUtils.getOMBuilder(
-                        getTestResource("soap/whitespacedMessage.xml"))
+                        getTestResource(TestConstants.WHITESPACE_MESSAGE))
                         .getDocumentElement();
         OMTestUtils.walkThrough(soapEnvelope);
     }
@@ -37,7 +38,7 @@
     public void testMinimalMessage() throws OMException, Exception {
         soapEnvelope =
                 (SOAPEnvelope) OMTestUtils.getOMBuilder(
-                        getTestResource("soap/minimalMessage.xml"))
+                        getTestResource(TestConstants.MINIMAL_MESSAGE))
                         .getDocumentElement();
         OMTestUtils.walkThrough(soapEnvelope);
     }
@@ -45,7 +46,7 @@
     public void testReallyBigMessage() throws OMException, Exception {
         soapEnvelope =
                 (SOAPEnvelope) OMTestUtils.getOMBuilder(
-                        getTestResource("soap/reallyReallyBigMessage.xml"))
+                        getTestResource(TestConstants.REALLY_BIG_MESSAGE))
                         .getDocumentElement();
         OMTestUtils.walkThrough(soapEnvelope);
     }
@@ -53,7 +54,7 @@
     public void testEmptyBodiedMessage() throws OMException, Exception {
         soapEnvelope =
                 (SOAPEnvelope) OMTestUtils.getOMBuilder(
-                        getTestResource("soap/emtyBodymessage.xml"))
+                        getTestResource(TestConstants.EMPTY_BODY_MESSAGE))
                         .getDocumentElement();
         OMTestUtils.walkThrough(soapEnvelope);
     }

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMDOMTestCase.java Sun Dec 21 11:39:53 2008
@@ -21,6 +21,7 @@
 
 import org.apache.axiom.om.AbstractTestCase;
 import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
@@ -37,7 +38,7 @@
 
 public abstract class OMDOMTestCase extends AbstractTestCase {
 
-    protected static final String IN_FILE_NAME = "soap/soapmessage.xml";
+    protected static final String IN_FILE_NAME = TestConstants.SOAP_SOAPMESSAGE;
     protected StAXSOAPModelBuilder builder;
     protected OMFactory ombuilderFactory;
     protected SOAPFactory soapFactory;

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/ElementSerializerTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/ElementSerializerTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/ElementSerializerTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/ElementSerializerTest.java Sun Dec 21 11:39:53 2008
@@ -28,6 +28,7 @@
 import org.apache.axiom.om.OMText;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.OMConstants;
+import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
@@ -53,7 +54,7 @@
     protected void setUp() throws Exception {
         reader =
                 XMLInputFactory.newInstance().
-                        createXMLStreamReader(getTestResource("soap/soapmessage.xml"));
+                        createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE));
         tempFile = File.createTempFile("temp", "xml");
         writer = XMLOutputFactory.newInstance().
                 createXMLStreamWriter(new FileOutputStream(tempFile), OMConstants.DEFAULT_CHAR_SET_ENCODING);

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMSerializerTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMSerializerTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMSerializerTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/serializer/OMSerializerTest.java Sun Dec 21 11:39:53 2008
@@ -23,6 +23,7 @@
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.OMConstants;
+import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axiom.om.impl.serialize.StreamingOMSerializer;
@@ -52,7 +53,7 @@
     protected void setUp() throws Exception {
         reader =
                 XMLInputFactory.newInstance().
-                        createXMLStreamReader(getTestResource("soap/soapmessage.xml"));
+                        createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE));
         tempFile = File.createTempFile("temp", "xml");
 //        writer =
 //                XMLOutputFactory.newInstance().

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java Sun Dec 21 11:39:53 2008
@@ -22,6 +22,7 @@
 import org.apache.axiom.om.AbstractTestCase;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axiom.soap.SOAPEnvelope;
 
@@ -40,7 +41,7 @@
 
     protected void setUp() throws Exception {
         XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().
-                createXMLStreamReader(getTestResource("soap/soapmessage1.xml"));
+                createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE1));
         OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(
                 OMAbstractFactory.getSOAP11Factory(), xmlStreamReader);
         envelope = (SOAPEnvelope) builder.getDocumentElement();

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OmStAXBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OmStAXBuilderTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OmStAXBuilderTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/streamwrapper/OmStAXBuilderTest.java Sun Dec 21 11:39:53 2008
@@ -22,6 +22,7 @@
 import org.apache.axiom.om.AbstractTestCase;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
@@ -43,7 +44,7 @@
     protected void setUp() throws Exception {
         factory = OMAbstractFactory.getSOAP11Factory();
         XMLStreamReader reader = XMLInputFactory.newInstance().
-                createXMLStreamReader(getTestResource("soap/soapmessage.xml"));
+                createXMLStreamReader(getTestResource(TestConstants.SOAP_SOAPMESSAGE));
         builder =
                 OMXMLBuilderFactory.createStAXSOAPModelBuilder(factory,
                                                                reader);

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMEnvelopeTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMEnvelopeTest.java?rev=728482&r1=728481&r2=728482&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMEnvelopeTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/OMEnvelopeTest.java Sun Dec 21 11:39:53 2008
@@ -22,6 +22,7 @@
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMTestCase;
 import org.apache.axiom.om.OMTestUtils;
+import org.apache.axiom.om.TestConstants;
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPHeader;
@@ -55,7 +56,7 @@
 
     private SOAPEnvelope getSecondEnvelope() throws Exception {
         return (SOAPEnvelope) OMTestUtils.getOMBuilder(
-                getTestResource("soap/sample1.xml"))
+                getTestResource(TestConstants.SAMPLE1))
                 .getDocumentElement();
     }