Author: veithen
Date: Thu Jul 10 23:13:48 2014
New Revision: 1609587

URL: http://svn.apache.org/r1609587
Log:
LLOM: Ensure that insertSibling(Before|After) correctly import siblings created 
by a different Axiom implementation.

Added:
    
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/
    
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestCase.java
   (with props)
    
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestSuiteBuilder.java
   (with props)
    
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestAddChild.java
   (with props)
    
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestInsertSibling.java
   (with props)
    webservices/axiom/trunk/systests/cross-om-tests/   (with props)
    webservices/axiom/trunk/systests/cross-om-tests/pom.xml   (with props)
    webservices/axiom/trunk/systests/cross-om-tests/src/
    webservices/axiom/trunk/systests/cross-om-tests/src/main/
    webservices/axiom/trunk/systests/cross-om-tests/src/main/java/
    webservices/axiom/trunk/systests/cross-om-tests/src/main/resources/
    webservices/axiom/trunk/systests/cross-om-tests/src/test/
    webservices/axiom/trunk/systests/cross-om-tests/src/test/java/
    
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/DOOM2LLOMTest.java
   (with props)
    
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/LLOM2DOOMTest.java
   (with props)
    webservices/axiom/trunk/systests/cross-om-tests/src/test/resources/
Modified:
    
webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerSupport.aj
    
webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMNodeImpl.java
    webservices/axiom/trunk/systests/pom.xml

Modified: 
webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerSupport.aj
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerSupport.aj?rev=1609587&r1=1609586&r2=1609587&view=diff
==============================================================================
--- 
webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerSupport.aj
 (original)
+++ 
webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMContainerSupport.aj
 Thu Jul 10 23:13:48 2014
@@ -101,6 +101,22 @@ public aspect OMContainerSupport {
         addChild(omNode, false);
     }
 
+    public final INode IContainer.prepareNewChild(OMNode omNode) {
+        INode child;
+        // Careful here: if the child was created by another Axiom 
implementation, it doesn't
+        // necessarily implement INode
+        if 
(omNode.getOMFactory().getMetaFactory().equals(getOMFactory().getMetaFactory()))
 {
+            child = (INode)omNode;
+        } else {
+            child = (INode)((OMFactoryEx)getOMFactory()).importNode(omNode);
+        }
+        checkChild(omNode);
+        if (child.getParent() != null) {
+            child.detach();
+        }
+        return child;
+    }
+
     public void IContainer.addChild(OMNode omNode, boolean fromBuilder) {
         INode child;
         if (fromBuilder) {
@@ -123,10 +139,7 @@ public aspect OMContainerSupport {
                 // We don't need to detach and re-add it.
                 return;
             }
-            checkChild(omNode);
-        }
-        if (child.getParent() != null) {
-            child.detach();
+            child = prepareNewChild(omNode);
         }
         
         child.coreSetParent(this);

Modified: 
webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMNodeImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMNodeImpl.java?rev=1609587&r1=1609586&r2=1609587&view=diff
==============================================================================
--- 
webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMNodeImpl.java
 (original)
+++ 
webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMNodeImpl.java
 Thu Jul 10 23:13:48 2014
@@ -25,12 +25,10 @@ import org.apache.axiom.om.OMException;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMInformationItem;
 import org.apache.axiom.om.OMNode;
-import org.apache.axiom.om.impl.builder.OMFactoryEx;
 import org.apache.axiom.om.impl.common.CoreChildNode;
 import org.apache.axiom.om.impl.common.IContainer;
 import org.apache.axiom.om.impl.common.CoreParentNode;
 import org.apache.axiom.om.impl.common.INode;
-import org.apache.axiom.om.impl.llom.factory.OMLinkedListImplFactory;
 
 /** Class OMNodeImpl */
 public abstract class OMNodeImpl extends OMSerializableImpl implements OMNode {
@@ -101,11 +99,6 @@ public abstract class OMNodeImpl extends
      * @param node
      */
     public void setNextOMSibling(OMNode node) {
-        if (node == null || node.getOMFactory() instanceof 
OMLinkedListImplFactory) {
-            this.nextSibling = (OMNodeImpl) node;
-        } else {
-            this.nextSibling = (OMNodeImpl) 
((OMFactoryEx)factory).importNode(node);
-        }
         this.nextSibling = (OMNodeImpl) node;
     }
 
@@ -152,24 +145,19 @@ public abstract class OMNodeImpl extends
         } else if (this == sibling) {
             throw new OMException("Inserting self as the sibling is not 
allowed");
         }
-        if (sibling.getParent() != null) {
-            sibling.detach();
+        OMNodeImpl siblingImpl = (OMNodeImpl)parent.prepareNewChild(sibling);
+        siblingImpl.coreSetParent(parent);
+        if (nextSibling == null) {
+            getNextOMSibling();
         }
-        ((CoreChildNode)sibling).coreSetParent(parent);
-        if (sibling instanceof OMNodeImpl) {
-            OMNodeImpl siblingImpl = (OMNodeImpl) sibling;
-            if (nextSibling == null) {
-                getNextOMSibling();
-            }
-            siblingImpl.setPreviousOMSibling(this);
-            if (nextSibling == null) {
-                parent.coreSetLastChild((CoreChildNode)sibling);
-            } else {
-                nextSibling.setPreviousOMSibling(sibling);
-            }
-            ((INode)sibling).setNextOMSibling(nextSibling);
-            nextSibling = siblingImpl;
+        siblingImpl.setPreviousOMSibling(this);
+        if (nextSibling == null) {
+            parent.coreSetLastChild((CoreChildNode)sibling);
+        } else {
+            nextSibling.setPreviousOMSibling(sibling);
         }
+        ((INode)sibling).setNextOMSibling(nextSibling);
+        nextSibling = siblingImpl;
     }
 
     /**
@@ -184,25 +172,18 @@ public abstract class OMNodeImpl extends
         } else if (this == sibling) {
             throw new OMException("Inserting self as the sibling is not 
allowed");
         }
-        if (sibling.getParent() != null) {
-            sibling.detach();
-        }
-        if (sibling instanceof OMNodeImpl) {
-            OMNodeImpl siblingImpl = (OMNodeImpl) sibling;
-            
-            if (previousSibling == null) {
-                parent.coreSetFirstChild(siblingImpl);
-                siblingImpl.nextSibling = this;
-                siblingImpl.previousSibling = null;
-            } else {
-                siblingImpl.coreSetParent(parent);
-                siblingImpl.nextSibling = this;
-                previousSibling.setNextOMSibling(siblingImpl);
-                siblingImpl.setPreviousOMSibling(previousSibling);
-            }
-            previousSibling = siblingImpl;
-
+        OMNodeImpl siblingImpl = (OMNodeImpl)parent.prepareNewChild(sibling);
+        if (previousSibling == null) {
+            parent.coreSetFirstChild(siblingImpl);
+            siblingImpl.nextSibling = this;
+            siblingImpl.previousSibling = null;
+        } else {
+            siblingImpl.coreSetParent(parent);
+            siblingImpl.nextSibling = this;
+            previousSibling.setNextOMSibling(siblingImpl);
+            siblingImpl.setPreviousOMSibling(previousSibling);
         }
+        previousSibling = siblingImpl;
     }
 
     /**
@@ -220,12 +201,7 @@ public abstract class OMNodeImpl extends
      * @param previousSibling
      */
     public void setPreviousOMSibling(OMNode previousSibling) {
-        if (previousSibling == null ||
-                previousSibling.getOMFactory() instanceof 
OMLinkedListImplFactory) {
-            this.previousSibling = (OMNodeImpl) previousSibling;
-        } else {
-            this.previousSibling = (OMNodeImpl) 
((OMFactoryEx)factory).importNode(previousSibling);
-        }
+        this.previousSibling = (OMNodeImpl) previousSibling;
     }
 
     /**

Added: 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestCase.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestCase.java?rev=1609587&view=auto
==============================================================================
--- 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestCase.java
 (added)
+++ 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestCase.java
 Thu Jul 10 23:13:48 2014
@@ -0,0 +1,31 @@
+/*
+ * 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.cross;
+
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.ts.AxiomTestCase;
+
+public abstract class CrossOMTestCase extends AxiomTestCase {
+    protected final OMMetaFactory altMetaFactory;
+
+    public CrossOMTestCase(OMMetaFactory metaFactory, OMMetaFactory 
altMetaFactory) {
+        super(metaFactory);
+        this.altMetaFactory = altMetaFactory;
+    }
+}

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

Added: 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestSuiteBuilder.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestSuiteBuilder.java?rev=1609587&view=auto
==============================================================================
--- 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestSuiteBuilder.java
 (added)
+++ 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/CrossOMTestSuiteBuilder.java
 Thu Jul 10 23:13:48 2014
@@ -0,0 +1,39 @@
+/*
+ * 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.cross;
+
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
+
+public class CrossOMTestSuiteBuilder extends MatrixTestSuiteBuilder {
+    private final OMMetaFactory metaFactory;
+    private final OMMetaFactory altMetaFactory;
+    
+    public CrossOMTestSuiteBuilder(OMMetaFactory metaFactory, OMMetaFactory 
altMetaFactory) {
+        this.metaFactory = metaFactory;
+        this.altMetaFactory = altMetaFactory;
+    }
+
+    @Override
+    protected void addTests() {
+        addTest(new TestAddChild(metaFactory, altMetaFactory));
+        addTest(new TestInsertSibling(metaFactory, altMetaFactory, false));
+        addTest(new TestInsertSibling(metaFactory, altMetaFactory, true));
+    }
+}

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

Added: 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestAddChild.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestAddChild.java?rev=1609587&view=auto
==============================================================================
--- 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestAddChild.java
 (added)
+++ 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestAddChild.java
 Thu Jul 10 23:13:48 2014
@@ -0,0 +1,44 @@
+/*
+ * 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.cross;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMMetaFactory;
+
+public class TestAddChild extends CrossOMTestCase {
+    public TestAddChild(OMMetaFactory metaFactory, OMMetaFactory 
altMetaFactory) {
+        super(metaFactory, altMetaFactory);
+    }
+
+    @Override
+    protected void runTest() throws Throwable {
+        OMElement parent = 
metaFactory.getOMFactory().createOMElement("parent", null);
+        OMElement orgChild = 
altMetaFactory.getOMFactory().createOMElement("child", null);
+        parent.addChild(orgChild);
+        OMElement child = (OMElement)parent.getFirstOMChild();
+        assertThat(child, is(not(sameInstance(orgChild))));
+        assertThat(child.getLocalName(), is(equalTo("child")));
+    }
+}

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

Added: 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestInsertSibling.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestInsertSibling.java?rev=1609587&view=auto
==============================================================================
--- 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestInsertSibling.java
 (added)
+++ 
webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/cross/TestInsertSibling.java
 Thu Jul 10 23:13:48 2014
@@ -0,0 +1,57 @@
+/*
+ * 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.cross;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.apache.axiom.om.OMComment;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.OMText;
+
+public class TestInsertSibling extends CrossOMTestCase {
+    private final boolean before;
+    
+    public TestInsertSibling(OMMetaFactory metaFactory, OMMetaFactory 
altMetaFactory, boolean before) {
+        super(metaFactory, altMetaFactory);
+        this.before = before;
+        addTestParameter("before", before);
+    }
+
+    @Override
+    protected void runTest() throws Throwable {
+        OMFactory factory = metaFactory.getOMFactory();
+        OMElement parent = factory.createOMElement("parent", null);
+        OMText child = factory.createOMText(parent, "test");
+        OMComment orgSibling = 
altMetaFactory.getOMFactory().createOMComment(null, "test");
+        if (before) {
+            child.insertSiblingBefore(orgSibling);
+        } else {
+            child.insertSiblingAfter(orgSibling);
+        }
+        OMComment sibling = (OMComment)(before ? child.getPreviousOMSibling() 
: child.getNextOMSibling());
+        assertThat(sibling, is(not(sameInstance(orgSibling))));
+        assertThat(sibling.getValue(), is(equalTo("test")));
+    }
+}

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

Propchange: webservices/axiom/trunk/systests/cross-om-tests/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jul 10 23:13:48 2014
@@ -0,0 +1,4 @@
+.classpath
+.project
+target
+.settings

Added: webservices/axiom/trunk/systests/cross-om-tests/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/cross-om-tests/pom.xml?rev=1609587&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/cross-om-tests/pom.xml (added)
+++ webservices/axiom/trunk/systests/cross-om-tests/pom.xml Thu Jul 10 23:13:48 
2014
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.ws.commons.axiom</groupId>
+        <artifactId>systests</artifactId>
+        <version>1.2.15-SNAPSHOT</version>
+    </parent>
+    <artifactId>cross-om-tests</artifactId>
+    <name>Cross OM Tests</name>
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-testsuite</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-impl</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axiom-dom</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file

Propchange: webservices/axiom/trunk/systests/cross-om-tests/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/DOOM2LLOMTest.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/cross-om-tests/src/test/java/DOOM2LLOMTest.java?rev=1609587&view=auto
==============================================================================
--- 
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/DOOM2LLOMTest.java
 (added)
+++ 
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/DOOM2LLOMTest.java
 Thu Jul 10 23:13:48 2014
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.ts.om.cross.CrossOMTestSuiteBuilder;
+
+public class DOOM2LLOMTest extends TestCase {
+    public static TestSuite suite() {
+        CrossOMTestSuiteBuilder builder = new CrossOMTestSuiteBuilder(
+                OMAbstractFactory.getMetaFactory(),
+                
OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM));
+        
+        return builder.build();
+    }
+}

Propchange: 
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/DOOM2LLOMTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/LLOM2DOOMTest.java
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/cross-om-tests/src/test/java/LLOM2DOOMTest.java?rev=1609587&view=auto
==============================================================================
--- 
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/LLOM2DOOMTest.java
 (added)
+++ 
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/LLOM2DOOMTest.java
 Thu Jul 10 23:13:48 2014
@@ -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.
+ */
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.ts.om.cross.CrossOMTestSuiteBuilder;
+import org.apache.axiom.ts.om.cross.TestInsertSibling;
+
+public class LLOM2DOOMTest extends TestCase {
+    public static TestSuite suite() {
+        CrossOMTestSuiteBuilder builder = new CrossOMTestSuiteBuilder(
+                
OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM),
+                OMAbstractFactory.getMetaFactory());
+        
+        // TODO
+        builder.exclude(TestInsertSibling.class);
+        
+        return builder.build();
+    }
+}

Propchange: 
webservices/axiom/trunk/systests/cross-om-tests/src/test/java/LLOM2DOOMTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/systests/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/pom.xml?rev=1609587&r1=1609586&r2=1609587&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/pom.xml (original)
+++ webservices/axiom/trunk/systests/pom.xml Thu Jul 10 23:13:48 2014
@@ -46,6 +46,7 @@
         </plugins>
     </build>
     <modules>
+        <module>cross-om-tests</module>
         <module>eclipse-tests</module>
         <module>jboss-tests</module>
         <module>osgi-tests</module>


Reply via email to