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 2009/07/14 22:11:05 UTC
svn commit: r794050 - in /webservices/commons/trunk/modules/axiom/modules:
axiom-api/src/test/java/org/apache/axiom/om/
axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/
axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/
axiom-tests/src/test/j...
Author: veithen
Date: Tue Jul 14 20:11:04 2009
New Revision: 794050
URL: http://svn.apache.org/viewvc?rev=794050&view=rev
Log:
Generalized OMDocumentSerilizationTest to DOOM.
Added:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentSerilizationTestBase.java
- copied, changed from r793175, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentSerilizationTest.java
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/DocumentImplSerializationTest.java (with props)
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentImplSerializationTest.java (with props)
Removed:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentSerilizationTest.java
Copied: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentSerilizationTestBase.java (from r793175, webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentSerilizationTest.java)
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentSerilizationTestBase.java?p2=webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentSerilizationTestBase.java&p1=webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentSerilizationTest.java&r1=793175&r2=794050&rev=794050&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentSerilizationTest.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/OMDocumentSerilizationTestBase.java Tue Jul 14 20:11:04 2009
@@ -17,10 +17,9 @@
* under the License.
*/
-package org.apache.axiom.om.impl.llom;
+package org.apache.axiom.om;
import junit.framework.TestCase;
-import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMDocument;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
@@ -32,7 +31,8 @@
import java.io.UnsupportedEncodingException;
/** This tests the serializeAndConsume method */
-public class OMDocumentSerilizationTest extends TestCase {
+public class OMDocumentSerilizationTestBase extends TestCase {
+ private final OMMetaFactory omMetaFactory;
private OMDocument document;
private String xmlDeclStart = "<?xml";
@@ -45,8 +45,12 @@
private String version2 = "version=\"1.0\"";
private String version2_11 = "version=\"1.1\"";
+ public OMDocumentSerilizationTestBase(OMMetaFactory omMetaFactory) {
+ this.omMetaFactory = omMetaFactory;
+ }
+
public void setUp() {
- OMFactory factory = OMAbstractFactory.getOMFactory();
+ OMFactory factory = omMetaFactory.getOMFactory();
OMNamespace namespace = factory.createOMNamespace("http://testuri.org", "test");
OMElement documentElement = factory.createOMElement("DocumentElement", namespace);
@@ -60,11 +64,6 @@
}
- public OMDocumentSerilizationTest(String name) {
- super(name);
- }
-
-
public void testXMLDecleration() throws XMLStreamException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
document.serializeAndConsume(baos);
@@ -88,6 +87,9 @@
}
public void testCharsetEncoding() throws XMLStreamException {
+ // LLOM already sets the charset encoding to UTF-8, but DOOM does not
+ document.setCharsetEncoding("UTF-8");
+
ByteArrayOutputStream baos = new ByteArrayOutputStream();
document.serializeAndConsume(baos);
Added: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/DocumentImplSerializationTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/DocumentImplSerializationTest.java?rev=794050&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/DocumentImplSerializationTest.java (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/DocumentImplSerializationTest.java Tue Jul 14 20:11:04 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.om.impl.dom;
+
+import org.apache.axiom.om.OMDocumentSerilizationTestBase;
+import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
+
+public class DocumentImplSerializationTest extends OMDocumentSerilizationTestBase {
+ public DocumentImplSerializationTest() {
+ super(new OMDOMMetaFactory());
+ }
+}
Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/DocumentImplSerializationTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentImplSerializationTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentImplSerializationTest.java?rev=794050&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentImplSerializationTest.java (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentImplSerializationTest.java Tue Jul 14 20:11:04 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.om.impl.llom;
+
+import org.apache.axiom.om.OMDocumentSerilizationTestBase;
+import org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory;
+
+public class OMDocumentImplSerializationTest extends OMDocumentSerilizationTestBase {
+ public OMDocumentImplSerializationTest() {
+ super(new OMLinkedListMetaFactory());
+ }
+}
Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/test/java/org/apache/axiom/om/impl/llom/OMDocumentImplSerializationTest.java
------------------------------------------------------------------------------
svn:eol-style = native