ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1703917 - in /webservices/axiom/trunk: ./ implementations/fom-impl/ implementations/fom-impl/src/test/java/org/apache/axiom/ implementations/fom-impl/src/test/java/org/apache/axiom/fom/ implementations/fom-impl/src/test/java/org/apache/axi...
Date Fri, 18 Sep 2015 20:35:29 GMT
Author: veithen
Date: Fri Sep 18 20:35:29 2015
New Revision: 1703917

URL: http://svn.apache.org/viewvc?rev=1703917&view=rev
Log:
Add a FOM test suite.

Added:
    webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/
    webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/
    webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/
    webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/FOMImplementationTest.java
  (with props)
    webservices/axiom/trunk/testing/fom-testsuite/   (with props)
    webservices/axiom/trunk/testing/fom-testsuite/pom.xml   (with props)
    webservices/axiom/trunk/testing/fom-testsuite/src/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/AbderaTestCase.java
  (with props)
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/FOMTestSuiteBuilder.java
  (with props)
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/attribute/
    webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/attribute/TestGetFactory.java
  (with props)
    webservices/axiom/trunk/testing/fom-testsuite/src/test/
    webservices/axiom/trunk/testing/fom-testsuite/src/test/java/
    webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/
    webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/
    webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/
    webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/ts/
    webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/ts/fom/
    webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/ts/fom/AbderaTest.java
  (with props)
Modified:
    webservices/axiom/trunk/implementations/fom-impl/pom.xml
    webservices/axiom/trunk/pom.xml
    webservices/axiom/trunk/testing/pom.xml

Modified: webservices/axiom/trunk/implementations/fom-impl/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/pom.xml?rev=1703917&r1=1703916&r2=1703917&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/pom.xml (original)
+++ webservices/axiom/trunk/implementations/fom-impl/pom.xml Fri Sep 18 20:35:29 2015
@@ -74,6 +74,11 @@
             <artifactId>truth</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>fom-testsuite</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

Added: webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/FOMImplementationTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/FOMImplementationTest.java?rev=1703917&view=auto
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/FOMImplementationTest.java
(added)
+++ webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/FOMImplementationTest.java
Fri Sep 18 20:35:29 2015
@@ -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.fom.impl;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.abdera.Abdera;
+import org.apache.axiom.ts.fom.FOMTestSuiteBuilder;
+
+public class FOMImplementationTest extends TestCase {
+    public static TestSuite suite() {
+        return new FOMTestSuiteBuilder(new Abdera()).build();
+    }
+}

Propchange: webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/FOMImplementationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1703917&r1=1703916&r2=1703917&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Fri Sep 18 20:35:29 2015
@@ -468,6 +468,11 @@
                 <artifactId>abdera-core</artifactId>
                 <version>1.1.3</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.abdera</groupId>
+                <artifactId>abdera-parser</artifactId>
+                <version>1.1.3</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

Propchange: webservices/axiom/trunk/testing/fom-testsuite/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Sep 18 20:35:29 2015
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+target

Added: webservices/axiom/trunk/testing/fom-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/fom-testsuite/pom.xml?rev=1703917&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/fom-testsuite/pom.xml (added)
+++ webservices/axiom/trunk/testing/fom-testsuite/pom.xml Fri Sep 18 20:35:29 2015
@@ -0,0 +1,51 @@
+<?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>testing</artifactId>
+        <version>1.2.16-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>fom-testsuite</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.abdera</groupId>
+            <artifactId>abdera-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>testutils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.abdera</groupId>
+            <artifactId>abdera-parser</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.truth</groupId>
+            <artifactId>truth</artifactId>
+        </dependency>
+    </dependencies>
+</project>

Propchange: webservices/axiom/trunk/testing/fom-testsuite/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/AbderaTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/AbderaTestCase.java?rev=1703917&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/AbderaTestCase.java
(added)
+++ webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/AbderaTestCase.java
Fri Sep 18 20:35:29 2015
@@ -0,0 +1,30 @@
+/*
+ * 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.fom;
+
+import org.apache.abdera.Abdera;
+import org.apache.axiom.testutils.suite.MatrixTestCase;
+
+public abstract class AbderaTestCase extends MatrixTestCase {
+    protected final Abdera abdera;
+
+    public AbderaTestCase(Abdera abdera) {
+        this.abdera = abdera;
+    }
+}

Propchange: webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/AbderaTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/FOMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/FOMTestSuiteBuilder.java?rev=1703917&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/FOMTestSuiteBuilder.java
(added)
+++ webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/FOMTestSuiteBuilder.java
Fri Sep 18 20:35:29 2015
@@ -0,0 +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
+ *
+ * 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.fom;
+
+import org.apache.abdera.Abdera;
+import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
+
+public class FOMTestSuiteBuilder extends MatrixTestSuiteBuilder {
+    private final Abdera abdera;
+
+    public FOMTestSuiteBuilder(Abdera abdera) {
+        this.abdera = abdera;
+    }
+
+    @Override
+    protected void addTests() {
+        addTest(new org.apache.axiom.ts.fom.attribute.TestGetFactory(abdera));
+    }
+}

Propchange: webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/FOMTestSuiteBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/attribute/TestGetFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/attribute/TestGetFactory.java?rev=1703917&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/attribute/TestGetFactory.java
(added)
+++ webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/attribute/TestGetFactory.java
Fri Sep 18 20:35:29 2015
@@ -0,0 +1,48 @@
+/*
+ * 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.fom.attribute;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import org.apache.abdera.Abdera;
+import org.apache.abdera.factory.Factory;
+import org.apache.abdera.model.Attribute;
+import org.apache.abdera.model.Element;
+import org.apache.abdera.model.Feed;
+import org.apache.axiom.ts.fom.AbderaTestCase;
+
+/**
+ * Tests that an {@link Attribute} added using {@link Element#setAttributeValue(String, String)}
+ * inherits the factory from the element.
+ */
+public class TestGetFactory extends AbderaTestCase {
+    public TestGetFactory(Abdera abdera) {
+        super(abdera);
+    }
+
+    @Override
+    protected void runTest() throws Throwable {
+        Factory factory = abdera.getFactory();
+        Feed feed = factory.newFeed();
+        feed.setAttributeValue("attr", "value");
+        Object xpathResult = abdera.getXPath().selectSingleNode("./@attr", feed);
+        assertThat(xpathResult).isInstanceOf(Attribute.class);
+        assertThat(((Attribute)xpathResult).getFactory()).isSameAs(factory);
+    }
+}

Propchange: webservices/axiom/trunk/testing/fom-testsuite/src/main/java/org/apache/axiom/ts/fom/attribute/TestGetFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/ts/fom/AbderaTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/ts/fom/AbderaTest.java?rev=1703917&view=auto
==============================================================================
--- webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/ts/fom/AbderaTest.java
(added)
+++ webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/ts/fom/AbderaTest.java
Fri Sep 18 20:35:29 2015
@@ -0,0 +1,30 @@
+/*
+ * 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.fom;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.abdera.Abdera;
+
+public class AbderaTest extends TestCase {
+    public static TestSuite suite() {
+        return new FOMTestSuiteBuilder(new Abdera()).build();
+    }
+}

Propchange: webservices/axiom/trunk/testing/fom-testsuite/src/test/java/org/apache/axiom/ts/fom/AbderaTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/testing/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/pom.xml?rev=1703917&r1=1703916&r2=1703917&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/pom.xml (original)
+++ webservices/axiom/trunk/testing/pom.xml Fri Sep 18 20:35:29 2015
@@ -43,6 +43,7 @@
         <module>testutils</module>
         <module>xml-testsuite</module>
         <module>xml-truth</module>
+        <module>fom-testsuite</module>
     </modules>
 
     <build>



Mime
View raw message