You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by st...@apache.org on 2010/04/01 12:44:06 UTC
svn commit: r929913 - in /myfaces/extensions/cdi/trunk: core/impl/src/test/
core/impl/src/test/java/ core/impl/src/test/java/org/
core/impl/src/test/java/org/apache/
core/impl/src/test/java/org/apache/myfaces/
core/impl/src/test/java/org/apache/myfaces...
Author: struberg
Date: Thu Apr 1 10:44:06 2010
New Revision: 929913
URL: http://svn.apache.org/viewvc?rev=929913&view=rev
Log:
EXTCDI-18 add ProjectStageProducer + tests
Added:
myfaces/extensions/cdi/trunk/core/impl/src/test/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/test/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/test/impl/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/test/impl/projectstage/
myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/test/impl/projectstage/ProjectStageProducerTest.java
myfaces/extensions/cdi/trunk/core/impl/src/test/resources/
Modified:
myfaces/extensions/cdi/trunk/parent/pom.xml
Added: myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/test/impl/projectstage/ProjectStageProducerTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/test/impl/projectstage/ProjectStageProducerTest.java?rev=929913&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/test/impl/projectstage/ProjectStageProducerTest.java (added)
+++ myfaces/extensions/cdi/trunk/core/impl/src/test/java/org/apache/myfaces/extensions/cdi/core/test/impl/projectstage/ProjectStageProducerTest.java Thu Apr 1 10:44:06 2010
@@ -0,0 +1,52 @@
+/*
+ * 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.myfaces.extensions.cdi.core.test.impl.projectstage;
+
+import org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage;
+import org.apache.myfaces.extensions.cdi.core.impl.projectstage.ProjectStageProducer;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+
+/**
+ * <a href="mailto:struberg@yahoo.de">Mark Struberg</a>
+ */
+public class ProjectStageProducerTest
+{
+
+ /**
+ * This test checks if the manual {@link ProjectStage} detection via
+ * {@link ProjectStageProducer} works properly.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testManualDetection() throws Exception
+ {
+ ProjectStageProducer psp = ProjectStageProducer.getInstance();
+ Assert.assertNotNull(psp);
+
+ psp.determineProjectStage();
+
+ ProjectStage ps = psp.getProjectStage();
+ Assert.assertNotNull(ps);
+ Assert.assertEquals(ps, ProjectStage.Production);
+ Assert.assertTrue(ps == ProjectStage.Production);
+ }
+}
Modified: myfaces/extensions/cdi/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/parent/pom.xml?rev=929913&r1=929912&r2=929913&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/parent/pom.xml (original)
+++ myfaces/extensions/cdi/trunk/parent/pom.xml Thu Apr 1 10:44:06 2010
@@ -157,6 +157,8 @@
<!-- These dependencies are needed for each and every module in this project -->
<dependencies>
+
+ <!-- atinject and cdi specs for OWB-->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
@@ -170,12 +172,23 @@
<scope>provided</scope>
</dependency>
+ <!-- the interceptors spec from EE6 -->
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-interceptor_1.1_spec</artifactId>
<version>1.0.0-beta</version>
<scope>provided</scope>
</dependency>
+
+ <!-- we use testng for testing -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.1</version>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>