Author: veithen
Date: Thu Apr 29 18:02:01 2010
New Revision: 939406

URL: http://svn.apache.org/viewvc?rev=939406&view=rev
Log:
WSCOMMONS-452: Moved the test case for WrappedTextNodeStreamReader to Axiom.

Added:
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/util/
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/util/stax/
    
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/util/stax/WrappedTextNodeStreamReaderTest.java
      - copied, changed from r939086, 
axis/axis2/java/transports/trunk/modules/base/src/test/java/org/apache/axis2/format/WrappedTextNodeStreamReaderTest.java

Copied: 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/util/stax/WrappedTextNodeStreamReaderTest.java
 (from r939086, 
axis/axis2/java/transports/trunk/modules/base/src/test/java/org/apache/axis2/format/WrappedTextNodeStreamReaderTest.java)
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/util/stax/WrappedTextNodeStreamReaderTest.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/util/stax/WrappedTextNodeStreamReaderTest.java&p1=axis/axis2/java/transports/trunk/modules/base/src/test/java/org/apache/axis2/format/WrappedTextNodeStreamReaderTest.java&r1=939086&r2=939406&rev=939406&view=diff
==============================================================================
--- 
axis/axis2/java/transports/trunk/modules/base/src/test/java/org/apache/axis2/format/WrappedTextNodeStreamReaderTest.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/util/stax/WrappedTextNodeStreamReaderTest.java
 Thu Apr 29 18:02:01 2010
@@ -1,35 +1,35 @@
 /*
- *  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
+ * 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
+ * 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.
+ * 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.axis2.format;
+package org.apache.axiom.util.stax;
 
 import java.io.StringReader;
 import java.io.StringWriter;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.impl.serialize.StreamingOMSerializer;
+import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axiom.util.stax.WrappedTextNodeStreamReader;
 import org.custommonkey.xmlunit.XMLTestCase;
 
@@ -92,8 +92,7 @@ public class WrappedTextNodeStreamReader
         XMLStreamReader xmlStreamReader
             = new WrappedTextNodeStreamReader(wrapperElementName, reader, 
chunkSize);
         StringWriter writer = new StringWriter();
-        XMLStreamWriter xmlStreamWriter
-            = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);
+        XMLStreamWriter xmlStreamWriter = 
StAXUtils.createXMLStreamWriter(writer);
         new StreamingOMSerializer().serialize(xmlStreamReader, 
xmlStreamWriter);
         xmlStreamWriter.flush();
         assertXMLEqual(expectedXML, writer.toString());


Reply via email to