You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2009/02/06 13:16:59 UTC
svn commit: r741551 - in /incubator/openwebbeans/trunk/webbeans-impl: ./
src/it/ src/it/properties/ src/it/properties/src/
src/it/properties/src/main/ src/it/properties/src/main/java/
src/it/properties/src/test/ src/it/properties/src/test/java/ src/it/...
Author: struberg
Date: Fri Feb 6 12:16:58 2009
New Revision: 741551
URL: http://svn.apache.org/viewvc?rev=741551&view=rev
Log:
OWB-75 create integration tests for webbeans-impl
Added:
incubator/openwebbeans/trunk/webbeans-impl/src/it/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/pom.xml
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/main/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/main/java/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/test/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/test/spi/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/test/spi/configuration/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/test/spi/configuration/ConfigurationTest.java
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/resources/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/resources/META-INF/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/resources/META-INF/openwebbeans/
incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/resources/META-INF/openwebbeans/openwebbeans.properties
incubator/openwebbeans/trunk/webbeans-impl/src/it/settings.xml
Modified:
incubator/openwebbeans/trunk/webbeans-impl/pom.xml
Modified: incubator/openwebbeans/trunk/webbeans-impl/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/pom.xml?rev=741551&r1=741550&r2=741551&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/pom.xml (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/pom.xml Fri Feb 6 12:16:58 2009
@@ -134,6 +134,33 @@
</execution>
</executions>
</plugin>
+
+ <!-- invoke the integration tests under src/it -->
+ <plugin>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <configuration>
+ <debug>true</debug>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+ <settingsFile>src/it/settings.xml</settingsFile>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>install</goal>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Added: incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/pom.xml?rev=741551&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/pom.xml (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/pom.xml Fri Feb 6 12:16:58 2009
@@ -0,0 +1,44 @@
+<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/maven-v4_0_0.xsd">
+<!--
+
+ 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.
+-->
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans</artifactId>
+ <version>1.0.0-incubating-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-impl-it</artifactId>
+ <version>@pom.version@</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-impl</artifactId>
+ <version>@pom.version@</version>
+ </dependency>
+ </dependencies>
+</project>
Added: incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/test/spi/configuration/ConfigurationTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/test/spi/configuration/ConfigurationTest.java?rev=741551&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/test/spi/configuration/ConfigurationTest.java (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/java/org/apache/webbeans/test/spi/configuration/ConfigurationTest.java Fri Feb 6 12:16:58 2009
@@ -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.webbeans.test.spi.configuration;
+
+import junit.framework.Assert;
+
+import org.apache.webbeans.config.OpenWebBeansConfiguration;
+import org.junit.Test;
+
+public class ConfigurationTest
+{
+ @Test
+ public void testConfigurationParser()
+ {
+ OpenWebBeansConfiguration cfg = OpenWebBeansConfiguration.getInstance();
+
+ // not overloaded
+ String ts = cfg.getProperty("org.apache.webbeans.spi.TransactionService");
+ Assert.assertNotNull(ts);
+ Assert.assertEquals("org.apache.webbeans.spi.ee.TransactionServiceJndiImpl", ts);
+
+ // overloaded version 1
+ String wbf = cfg.getProperty("org.apache.webbeans.spi.JNDIService");
+ Assert.assertNotNull(wbf);
+ Assert.assertEquals("org.apache.webbeans.spi.ee.JNDIServiceEnterpriseImpl", wbf);
+
+ // property which is only in the specialised openwebbeans.properties
+ String testProperty = cfg.getProperty("test.property");
+ Assert.assertNotNull(testProperty);
+ Assert.assertEquals("true", testProperty);
+ }
+
+}
\ No newline at end of file
Added: incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/resources/META-INF/openwebbeans/openwebbeans.properties
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/resources/META-INF/openwebbeans/openwebbeans.properties?rev=741551&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/resources/META-INF/openwebbeans/openwebbeans.properties (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/it/properties/src/test/resources/META-INF/openwebbeans/openwebbeans.properties Fri Feb 6 12:16:58 2009
@@ -0,0 +1,17 @@
+#---------------------------------------------------------------
+# The overridden OpenWebBeans configuration for J2EE Geronimo
+#
+# This configuration is intended for the Apache Geronimo J2EE server
+#
+# The key is the Interface, the value the implementation of the service
+#
+#---------------------------------------------------------------
+
+# TODO these are currently only preliminary values for testing the mechanism!
+test.property=true
+
+# TODO these are currently only preliminary values for testing the mechanism!
+# use the real EE server JNDI implementation for storing objects in JNDI
+org.apache.webbeans.spi.JNDIService=org.apache.webbeans.spi.ee.JNDIServiceEnterpriseImpl
+org.apache.webbeans.spi.JPAService=org.apache.webbeans.spi.ee.geronimo.JPAServiceOpenEjb
+
Added: incubator/openwebbeans/trunk/webbeans-impl/src/it/settings.xml
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/it/settings.xml?rev=741551&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/it/settings.xml (added)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/it/settings.xml Fri Feb 6 12:16:58 2009
@@ -0,0 +1,52 @@
+<?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.
+-->
+
+<settings>
+ <profiles>
+ <profile>
+ <id>it-repo</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>local.central</id>
+ <url>file:///@localRepository@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>local.central</id>
+ <url>file:///@localRepository@</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <properties>
+ <openjpa.version>1.2.0</openjpa.version>
+ <hsqldb.version>1.8.0.8</hsqldb.version>
+ </properties>
+ </profile>
+ </profiles>
+</settings>