ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1162483 - /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/
Date Sun, 28 Aug 2011 08:06:48 GMT
Author: veithen
Date: Sun Aug 28 08:06:47 2011
New Revision: 1162483

URL: http://svn.apache.org/viewvc?rev=1162483&view=rev
Log:
Some minor refactoring of the createOMElement test cases.

Added:
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/CreateOMElementTestCase.java
  (with props)
Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java

Added: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/CreateOMElementTestCase.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/CreateOMElementTestCase.java?rev=1162483&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/CreateOMElementTestCase.java
(added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/CreateOMElementTestCase.java
Sun Aug 28 08:06:47 2011
@@ -0,0 +1,37 @@
+/*
+ * 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.om.factory;
+
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.ts.AxiomTestCase;
+
+/**
+ * Base class for the test cases that validate the behavior of the various
+ * <code>createOMElement</code> methods in {@link OMFactory}.
+ */
+public abstract class CreateOMElementTestCase extends AxiomTestCase {
+    protected final OMElementCreator variant;
+
+    public CreateOMElementTestCase(OMMetaFactory metaFactory, OMElementCreator variant) {
+        super(metaFactory);
+        this.variant = variant;
+        addTestProperty("variant", variant.getName());
+    }
+}

Propchange: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/CreateOMElementTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java?rev=1162483&r1=1162482&r2=1162483&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithDefaultNamespace.java
Sun Aug 28 08:06:47 2011
@@ -24,15 +24,10 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.ts.AxiomTestCase;
 
-public class TestCreateOMElementWithDefaultNamespace extends AxiomTestCase {
-    private final OMElementCreator variant;
-    
+public class TestCreateOMElementWithDefaultNamespace extends CreateOMElementTestCase {
     public TestCreateOMElementWithDefaultNamespace(OMMetaFactory metaFactory, OMElementCreator
variant) {
-        super(metaFactory);
-        this.variant = variant;
-        addTestProperty("variant", variant.getName());
+        super(metaFactory, variant);
     }
 
     protected void runTest() throws Throwable {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java?rev=1162483&r1=1162482&r2=1162483&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithGeneratedPrefix.java
Sun Aug 28 08:06:47 2011
@@ -24,15 +24,10 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.ts.AxiomTestCase;
 
-public class TestCreateOMElementWithGeneratedPrefix extends AxiomTestCase {
-    private final OMElementCreator variant;
-    
+public class TestCreateOMElementWithGeneratedPrefix extends CreateOMElementTestCase {
     public TestCreateOMElementWithGeneratedPrefix(OMMetaFactory metaFactory, OMElementCreator
variant) {
-        super(metaFactory);
-        this.variant = variant;
-        addTestProperty("variant", variant.getName());
+        super(metaFactory, variant);
     }
 
     protected void runTest() throws Throwable {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java?rev=1162483&r1=1162482&r2=1162483&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithInvalidNamespace.java
Sun Aug 28 08:06:47 2011
@@ -20,19 +20,14 @@ package org.apache.axiom.ts.om.factory;
 
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.ts.AxiomTestCase;
 
 /**
  * Tests that {@link OMFactory} forbids creating prefixed elements with an empty namespace
name.
  * Neither XML 1.0 nor XML 1.1 allow binding a prefix to the empty namespace name.
  */
-public class TestCreateOMElementWithInvalidNamespace extends AxiomTestCase {
-    private final OMElementCreator variant;
-    
+public class TestCreateOMElementWithInvalidNamespace extends CreateOMElementTestCase {
     public TestCreateOMElementWithInvalidNamespace(OMMetaFactory metaFactory, OMElementCreator
variant) {
-        super(metaFactory);
-        this.variant = variant;
-        addTestProperty("variant", variant.getName());
+        super(metaFactory, variant);
     }
 
     protected void runTest() throws Throwable {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java?rev=1162483&r1=1162482&r2=1162483&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithNonDefaultNamespace.java
Sun Aug 28 08:06:47 2011
@@ -24,15 +24,10 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
 import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.ts.AxiomTestCase;
 
-public class TestCreateOMElementWithNonDefaultNamespace extends AxiomTestCase {
-    private final OMElementCreator variant;
-    
+public class TestCreateOMElementWithNonDefaultNamespace extends CreateOMElementTestCase {
     public TestCreateOMElementWithNonDefaultNamespace(OMMetaFactory metaFactory, OMElementCreator
variant) {
-        super(metaFactory);
-        this.variant = variant;
-        addTestProperty("variant", variant.getName());
+        super(metaFactory, variant);
     }
 
     protected void runTest() throws Throwable {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java?rev=1162483&r1=1162482&r2=1162483&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/factory/TestCreateOMElementWithoutNamespace.java
Sun Aug 28 08:06:47 2011
@@ -21,15 +21,10 @@ package org.apache.axiom.ts.om.factory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMMetaFactory;
-import org.apache.axiom.ts.AxiomTestCase;
 
-public class TestCreateOMElementWithoutNamespace extends AxiomTestCase {
-    private final OMElementCreator variant;
-    
+public class TestCreateOMElementWithoutNamespace extends CreateOMElementTestCase {
     public TestCreateOMElementWithoutNamespace(OMMetaFactory metaFactory, OMElementCreator
variant) {
-        super(metaFactory);
-        this.variant = variant;
-        addTestProperty("variant", variant.getName());
+        super(metaFactory, variant);
     }
 
     protected void runTest() throws Throwable {



Mime
View raw message