Author: veithen
Date: Thu Apr 12 20:49:44 2012
New Revision: 1325508

URL: http://svn.apache.org/viewvc?rev=1325508&view=rev
Log:
Merged latest changes from trunk.

Added:
    
webservices/axiom/branches/AXIOM-412/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/document/
      - copied from r1325505, 
webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/document/
    
webservices/axiom/branches/AXIOM-412/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/document/TestImportNode.java
      - copied unchanged from r1325505, 
webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/document/TestImportNode.java
    
webservices/axiom/branches/AXIOM-412/modules/axiom-testsuite/src/main/resources/sigEncr.xml
      - copied unchanged from r1325505, 
webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/resources/sigEncr.xml
Removed:
    
webservices/axiom/branches/AXIOM-412/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/ElementImportTest.java
    
webservices/axiom/branches/AXIOM-412/modules/axiom-tests/src/test/resources/sigEncr.xml
Modified:
    webservices/axiom/branches/AXIOM-412/   (props changed)
    
webservices/axiom/branches/AXIOM-412/modules/axiom-api/src/test/java/org/apache/axiom/om/OMTestUtils.java
    
webservices/axiom/branches/AXIOM-412/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMTestUtils.java
    
webservices/axiom/branches/AXIOM-412/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java

Propchange: webservices/axiom/branches/AXIOM-412/
------------------------------------------------------------------------------
  Merged /webservices/commons/trunk/modules/axiom:r1325440-1325505

Modified: 
webservices/axiom/branches/AXIOM-412/modules/axiom-api/src/test/java/org/apache/axiom/om/OMTestUtils.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-412/modules/axiom-api/src/test/java/org/apache/axiom/om/OMTestUtils.java?rev=1325508&r1=1325507&r2=1325508&view=diff
==============================================================================
--- 
webservices/axiom/branches/AXIOM-412/modules/axiom-api/src/test/java/org/apache/axiom/om/OMTestUtils.java
 (original)
+++ 
webservices/axiom/branches/AXIOM-412/modules/axiom-api/src/test/java/org/apache/axiom/om/OMTestUtils.java
 Thu Apr 12 20:49:44 2012
@@ -21,12 +21,6 @@ package org.apache.axiom.om;
 
 import junit.framework.TestCase;
 
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
 import java.util.Iterator;
 
 public class OMTestUtils {
@@ -51,57 +45,4 @@ public class OMTestUtils {
             }
         }
     }
-
-    public static void compare(Element ele, OMElement omele) throws Exception {
-        if (ele == null && omele == null) {
-            return;
-        } else if (ele != null && omele != null) {
-            TestCase.assertEquals("Element name not correct",
-                                  ele.getLocalName(),
-                                  omele.getLocalName());
-            if (omele.getNamespace() != null) {
-                TestCase.assertEquals("Namespace URI not correct",
-                                      ele.getNamespaceURI(),
-                                      omele.getNamespace().getNamespaceURI());
-
-            }
-
-            //go through the attributes
-            NamedNodeMap map = ele.getAttributes();
-            Iterator attIterator = omele.getAllAttributes();
-            OMAttribute omattribute;
-            while (attIterator != null && attIterator.hasNext() && map == 
null) {
-                omattribute = (OMAttribute) attIterator.next();
-                Node node = map.getNamedItemNS(
-                        omattribute.getNamespace().getNamespaceURI(),
-                        omattribute.getLocalName());
-                if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-                    Attr attr = (Attr) node;
-                    TestCase.assertEquals(attr.getValue(),
-                                          omattribute.getAttributeValue());
-                } else {
-                    throw new OMException("return type is not a Attribute");
-                }
-
-            }
-            Iterator it = omele.getChildren();
-            NodeList list = ele.getChildNodes();
-            for (int i = 0; i < list.getLength(); i++) {
-                Node node = list.item(i);
-                if (node.getNodeType() == Node.ELEMENT_NODE) {
-                    TestCase.assertTrue(it.hasNext());
-                    OMNode tempOmNode = (OMNode) it.next();
-                    while (tempOmNode.getType() != OMNode.ELEMENT_NODE) {
-                        TestCase.assertTrue(it.hasNext());
-                        tempOmNode = (OMNode) it.next();
-                    }
-                    compare((Element) node, (OMElement) tempOmNode);
-                }
-            }
-
-
-        } else {
-            throw new Exception("One is null");
-        }
-    }
 }

Modified: 
webservices/axiom/branches/AXIOM-412/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMTestUtils.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-412/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMTestUtils.java?rev=1325508&r1=1325507&r2=1325508&view=diff
==============================================================================
--- 
webservices/axiom/branches/AXIOM-412/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMTestUtils.java
 (original)
+++ 
webservices/axiom/branches/AXIOM-412/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/dom/OMTestUtils.java
 Thu Apr 12 20:49:44 2012
@@ -20,18 +20,11 @@
 package org.apache.axiom.om.impl.dom;
 
 import junit.framework.TestCase;
-import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMNode;
 import org.apache.axiom.om.OMXMLBuilderFactory;
 import org.apache.axiom.om.OMXMLParserWrapper;
 import org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
 
 import java.io.InputStream;
 import java.util.Iterator;
@@ -64,57 +57,4 @@ public class OMTestUtils {
             }
         }
     }
-
-    public static void compare(Element ele, OMElement omele) throws Exception {
-        if (ele == null && omele == null) {
-            return;
-        } else if (ele != null && omele != null) {
-            TestCase.assertEquals("Element name not correct",
-                                  ele.getLocalName(),
-                                  omele.getLocalName());
-            if (omele.getNamespace() != null) {
-                TestCase.assertEquals("Namespace URI not correct",
-                                      ele.getNamespaceURI(),
-                                      omele.getNamespace().getNamespaceURI());
-
-            }
-
-            //go through the attributes
-            NamedNodeMap map = ele.getAttributes();
-            Iterator attIterator = omele.getAllAttributes();
-            OMAttribute omattribute;
-            while (attIterator != null && attIterator.hasNext() && map == 
null) {
-                omattribute = (OMAttribute) attIterator.next();
-                Node node = map.getNamedItemNS(
-                        omattribute.getNamespace().getNamespaceURI(),
-                        omattribute.getLocalName());
-                if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
-                    Attr attr = (Attr) node;
-                    TestCase.assertEquals(attr.getValue(),
-                                          omattribute.getAttributeValue());
-                } else {
-                    throw new OMException("return type is not a Attribute");
-                }
-
-            }
-            Iterator it = omele.getChildren();
-            NodeList list = ele.getChildNodes();
-            for (int i = 0; i < list.getLength(); i++) {
-                Node node = list.item(i);
-                if (node.getNodeType() == Node.ELEMENT_NODE) {
-                    TestCase.assertTrue(it.hasNext());
-                    OMNode tempOmNode = (OMNode) it.next();
-                    while (tempOmNode.getType() != OMNode.ELEMENT_NODE) {
-                        TestCase.assertTrue(it.hasNext());
-                        tempOmNode = (OMNode) it.next();
-                    }
-                    compare((Element) node, (OMElement) tempOmNode);
-                }
-            }
-
-
-        } else {
-            throw new Exception("One is null");
-        }
-    }
 }

Modified: 
webservices/axiom/branches/AXIOM-412/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/branches/AXIOM-412/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java?rev=1325508&r1=1325507&r2=1325508&view=diff
==============================================================================
--- 
webservices/axiom/branches/AXIOM-412/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java
 (original)
+++ 
webservices/axiom/branches/AXIOM-412/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/OMDOMTestSuiteBuilder.java
 Thu Apr 12 20:49:44 2012
@@ -36,6 +36,7 @@ public class OMDOMTestSuiteBuilder exten
 
     protected void addTests() {
         addTest(new 
org.apache.axiom.ts.omdom.attr.TestGetNamespaceNormalized(metaFactory));
+        addTest(new 
org.apache.axiom.ts.omdom.document.TestImportNode(metaFactory));
         addTest(new 
org.apache.axiom.ts.omdom.element.TestAddAttributeReplace(metaFactory));
         addTest(new 
org.apache.axiom.ts.omdom.element.TestAddChildFromForeignDocument(metaFactory));
         addTest(new 
org.apache.axiom.ts.omdom.element.TestGetNamespaceNormalized(metaFactory));


Reply via email to