[gatein-commits] gatein SVN: r7077 - in components/pc/trunk: federation and 5 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Aug 13 18:57:58 EDT 2011


Author: julien_viet
Date: 2011-08-13 18:57:57 -0400 (Sat, 13 Aug 2011)
New Revision: 7077

Removed:
   components/pc/trunk/federation/src/test/resources/jboss-unit.xml
Modified:
   components/pc/trunk/federation/pom.xml
   components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
   components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/NoInvokersTestCase.java
   components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/OneInvokerNoPortletsTestCase.java
   components/pc/trunk/pom.xml
   components/pc/trunk/test/core/pom.xml
   components/pc/trunk/test/pom.xml
   components/pc/trunk/test/servers/pom.xml
Log:
isolate jboss unit in test module as it's where it's required


Modified: components/pc/trunk/federation/pom.xml
===================================================================
--- components/pc/trunk/federation/pom.xml	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/federation/pom.xml	2011-08-13 22:57:57 UTC (rev 7077)
@@ -17,11 +17,6 @@
 
       <!--TEST SCOPE-->
       <dependency>
-         <groupId>org.jboss.unit</groupId>
-         <artifactId>jboss-unit-mc</artifactId>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
          <groupId>org.gatein.pc</groupId>
          <artifactId>pc-portlet</artifactId>
          <type>test-jar</type>
@@ -35,34 +30,5 @@
      </dependency>
 
    </dependencies>
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.jboss.unit</groupId>
-            <artifactId>jboss-unit-tooling-maven2</artifactId>
-            <executions>
-               <execution>
-                  <phase>test</phase>
-                  <goals>
-                     <goal>execute</goal>
-                  </goals>
-               </execution>
-            </executions>
-            <configuration>
-               <failOnError>true</failOnError>
-               <testsuites>
-                  <testsuite>
-                     <config>jboss-unit.xml</config>
-                  </testsuite>
-               </testsuites>
-               <reports>
-                  <xml>target/tests/reports/xml</xml>
-                  <html>target/tests/reports/html</html>
-               </reports>
-            </configuration>
-         </plugin>
-      </plugins>
-   </build>
 
-
 </project>

Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java	2011-08-13 22:57:57 UTC (rev 7077)
@@ -22,6 +22,7 @@
  */
 package org.gatein.pc.federation;
 
+import junit.framework.TestCase;
 import org.gatein.common.i18n.LocalizedString;
 import org.gatein.pc.api.NoSuchPortletException;
 import org.gatein.pc.api.Portlet;
@@ -34,9 +35,6 @@
 import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
 import org.gatein.pc.portlet.support.PortletInvokerSupport;
 import org.gatein.pc.portlet.support.info.PortletInfoSupport;
-import org.jboss.unit.api.pojo.annotations.Create;
-import org.jboss.unit.api.pojo.annotations.Destroy;
-import org.jboss.unit.api.pojo.annotations.Test;
 
 import java.util.Collection;
 import java.util.Locale;
@@ -48,7 +46,7 @@
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @version $Revision: 1.1 $
  */
-public class FederatingPortletInvokerTestCase
+public class FederatingPortletInvokerTestCase extends TestCase
 {
 
    private static final PortletContext PORTLET = PortletContext.createPortletContext("/webapp.portlet", false);
@@ -72,7 +70,6 @@
    /** . */
    private PortletContext portletContext;
 
-   @Create
    public void setUp() throws Exception
    {
       federatingInvoker = new FederatingPortletInvokerService();
@@ -97,7 +94,6 @@
       assertEquals(PortletInvoker.LOCAL_PORTLET_INVOKER_ID, localInvoker.getId());
    }
 
-   @Destroy
    public void tearDown() throws Exception
    {
       federatedInvoker = null;
@@ -107,7 +103,6 @@
       portletContext = null;
    }
 
-   @Test
    public void testGetPortlets() throws PortletInvokerException
    {
       Set<Portlet> portlets = federatingInvoker.getPortlets();
@@ -122,7 +117,6 @@
       }
    }
 
-   @Test
    public void testGetStatus() throws PortletInvokerException
    {
       assertEquals(PortletStatus.OFFERED, federatingInvoker.getStatus(REFERENCED_PORTLET));
@@ -132,7 +126,6 @@
       assertEquals(PortletStatus.OFFERED, localInvoker.getStatus(REFERENCED_LOCAL_PORTLET));
    }
 
-   @Test
    public void testFederation() throws PortletInvokerException
    {
       Collection federateds = federatingInvoker.getFederatedInvokers();
@@ -152,7 +145,6 @@
       assertEquals(localInvokerDelegate, federated.getPortletInvoker());
    }
 
-   @Test
    public void testInfo() throws PortletInvokerException
    {
       PortletInfo info = portlet.getInfo();
@@ -165,7 +157,6 @@
       assertEquals("FooPortlet", description.getDefaultString());
    }
 
-   @Test
    public void testGetPortletNonFederatedContext() throws PortletInvokerException
    {
       try
@@ -179,7 +170,6 @@
       }
    }
 
-   @Test
    public void testGetPortletOnFederatedInvoker() throws PortletInvokerException
    {
       PortletContext federatedContext = PortletContext.createPortletContext(federatedInvoker.getId() + PortletContext.INVOKER_SEPARATOR + portletContext.getId());
@@ -188,7 +178,6 @@
       assertEquals(samePortlet.getContext(), federatedContext);
    }
 
-   @Test
    public void testGetLocalPortlets() throws PortletInvokerException
    {
       Set<Portlet> localPortlets = federatingInvoker.getLocalPortlets();
@@ -198,7 +187,6 @@
       assertEquals(REFERENCED_LOCAL_PORTLET, localPortlet.getContext());
    }
 
-   @Test
    public void testGetRemotePortlets() throws PortletInvokerException
    {
       Set<Portlet> portlets = federatingInvoker.getRemotePortlets();
@@ -208,7 +196,6 @@
       assertEquals(REFERENCED_PORTLET, portlet.getContext());
    }
 
-   @Test
    public void testDelegatedResolution() throws PortletInvokerException
    {
       // create an invoker to check NullInvokerHandler behavior

Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/NoInvokersTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/NoInvokersTestCase.java	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/NoInvokersTestCase.java	2011-08-13 22:57:57 UTC (rev 7077)
@@ -22,23 +22,19 @@
  ******************************************************************************/
 package org.gatein.pc.federation;
 
+import junit.framework.TestCase;
 import org.gatein.pc.api.PortletInvokerException;
-import org.gatein.pc.federation.FederatingPortletInvoker;
 import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
 
 import java.util.HashSet;
 import java.util.ArrayList;
 
-import static org.jboss.unit.api.Assert.*;
-import org.jboss.unit.api.pojo.annotations.Test;
-
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @version $Revision: 1.1 $
  */
-public class NoInvokersTestCase
+public class NoInvokersTestCase extends TestCase
 {
-   @Test
    public void testNoFederated() throws PortletInvokerException
    {
       FederatingPortletInvoker federating = new FederatingPortletInvokerService();

Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/OneInvokerNoPortletsTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/OneInvokerNoPortletsTestCase.java	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/OneInvokerNoPortletsTestCase.java	2011-08-13 22:57:57 UTC (rev 7077)
@@ -22,27 +22,21 @@
  ******************************************************************************/
 package org.gatein.pc.federation;
 
+import junit.framework.TestCase;
 import org.gatein.pc.api.PortletInvokerException;
 import org.gatein.pc.portlet.support.PortletInvokerSupport;
-import org.gatein.pc.federation.FederatingPortletInvoker;
-import org.gatein.pc.federation.FederatedPortletInvoker;
 import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
 
 import java.util.HashSet;
 import java.util.Collection;
 
-import org.jboss.unit.api.pojo.annotations.Test;
-
-import static org.jboss.unit.api.Assert.*;
-
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @version $Revision: 1.1 $
  */
-public class OneInvokerNoPortletsTestCase
+public class OneInvokerNoPortletsTestCase extends TestCase
 {
 
-   @Test
    public void testOneFederatedWithNoPortlets() throws PortletInvokerException
    {
       FederatingPortletInvoker federating = new FederatingPortletInvokerService();

Deleted: components/pc/trunk/federation/src/test/resources/jboss-unit.xml
===================================================================
--- components/pc/trunk/federation/src/test/resources/jboss-unit.xml	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/federation/src/test/resources/jboss-unit.xml	2011-08-13 22:57:57 UTC (rev 7077)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jboss-unit
-   xmlns="urn:jboss:jboss-unit:1.0"
-   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-   xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
-   <pojo>
-      <test>
-         <class name="org.gatein.pc.federation.FederatingPortletInvokerTestCase"/>
-      </test>
-      <test>
-         <class name="org.gatein.pc.federation.NoInvokersTestCase"/>
-      </test>
-      <test>
-         <class name="org.gatein.pc.federation.OneInvokerNoPortletsTestCase"/>
-      </test>
-   </pojo>
-</jboss-unit>

Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/pom.xml	2011-08-13 22:57:57 UTC (rev 7077)
@@ -56,7 +56,6 @@
       <version.junit>4.6</version.junit>
 
       <!-- used in test module by maven-antrun-extended-plugin -->
-      <version.jboss.unit>1.2.3</version.jboss.unit>
       <version.cargo>1.0.3</version.cargo>
       <version.cargo.jetty.deployer>1.0.1</version.cargo.jetty.deployer>
       <version.cargo.jboss5.deployer>5.1.0.SP1</version.cargo.jboss5.deployer>
@@ -282,11 +281,6 @@
                <version>2.3.1</version>
             </plugin>
             <plugin>
-               <groupId>org.jboss.unit</groupId>
-               <artifactId>jboss-unit-tooling-maven2</artifactId>
-               <version>1.2.1</version>
-            </plugin>
-            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
             </plugin>

Modified: components/pc/trunk/test/core/pom.xml
===================================================================
--- components/pc/trunk/test/core/pom.xml	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/test/core/pom.xml	2011-08-13 22:57:57 UTC (rev 7077)
@@ -42,38 +42,10 @@
       <dependency>
          <groupId>org.jboss.unit</groupId>
          <artifactId>jboss-unit</artifactId>
-         <exclusions>
-           <exclusion>
-             <groupId>cargo</groupId>
-             <artifactId>core</artifactId>
-           </exclusion>
-         </exclusions>
       </dependency>
       <dependency>
          <groupId>org.jboss.unit</groupId>
          <artifactId>jboss-unit-remote</artifactId>
-         <exclusions>
-           <exclusion>
-             <groupId>cargo</groupId>
-             <artifactId>core</artifactId>
-           </exclusion>
-           <exclusion>
-               <groupId>hibernate</groupId>
-               <artifactId>hibernate3</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-log4j</groupId>
-               <artifactId>log4j</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-slide</groupId>
-               <artifactId>webdavlib</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-httpclient</groupId>
-               <artifactId>commons-httpclient</artifactId>
-            </exclusion>
-         </exclusions>
       </dependency>
       <dependency>
          <groupId>org.jboss.unit</groupId>
@@ -82,42 +54,10 @@
       <dependency>
          <groupId>org.jboss.unit</groupId>
          <artifactId>portal-test</artifactId>
-         <exclusions>
-           <exclusion>
-               <groupId>hibernate</groupId>
-               <artifactId>hibernate3</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-log4j</groupId>
-               <artifactId>log4j</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-slide</groupId>
-               <artifactId>webdavlib</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-httpclient</groupId>
-               <artifactId>commons-httpclient</artifactId>
-            </exclusion>
-         </exclusions>
       </dependency>
       <dependency>
          <groupId>org.jboss.unit</groupId>
          <artifactId>portal-test-generic</artifactId>
-         <exclusions>
-           <exclusion>
-             <groupId>org.codehaus.cargo</groupId>
-             <artifactId>cargo-core-uberjar</artifactId>
-           </exclusion>
-           <exclusion>
-               <groupId>hibernate</groupId>
-               <artifactId>hibernate3</artifactId>
-           </exclusion>
-           <exclusion>
-               <groupId>apache-log4j</groupId>
-               <artifactId>log4j</artifactId>
-            </exclusion>
-         </exclusions>
       </dependency>
 
       <dependency>

Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/test/pom.xml	2011-08-13 22:57:57 UTC (rev 7077)
@@ -9,6 +9,10 @@
    <packaging>pom</packaging>
    <name>GateIn - Portlet Container (test)</name>
 
+   <properties>
+      <version.jboss.unit>1.2.3</version.jboss.unit>
+   </properties>
+
    <dependencyManagement>
       <dependencies>
          <dependency>
@@ -16,6 +20,91 @@
             <artifactId>pc-test-core</artifactId>
             <version>${project.version}</version>
          </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>jboss-unit</artifactId>
+            <version>${version.jboss.unit}</version>
+            <exclusions>
+              <exclusion>
+                <groupId>cargo</groupId>
+                <artifactId>core</artifactId>
+              </exclusion>
+            </exclusions>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>jboss-unit-remote</artifactId>
+            <version>${version.jboss.unit}</version>
+            <exclusions>
+              <exclusion>
+                <groupId>cargo</groupId>
+                <artifactId>core</artifactId>
+              </exclusion>
+              <exclusion>
+                  <groupId>hibernate</groupId>
+                  <artifactId>hibernate3</artifactId>
+               </exclusion>
+               <exclusion>
+                  <groupId>apache-log4j</groupId>
+                  <artifactId>log4j</artifactId>
+               </exclusion>
+               <exclusion>
+                  <groupId>apache-slide</groupId>
+                  <artifactId>webdavlib</artifactId>
+               </exclusion>
+               <exclusion>
+                  <groupId>apache-httpclient</groupId>
+                  <artifactId>commons-httpclient</artifactId>
+               </exclusion>
+            </exclusions>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>jboss-unit-tooling-ant</artifactId>
+            <version>${version.jboss.unit}</version>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>portal-test</artifactId>
+            <version>${version.jboss.unit}</version>
+            <exclusions>
+              <exclusion>
+                  <groupId>hibernate</groupId>
+                  <artifactId>hibernate3</artifactId>
+               </exclusion>
+               <exclusion>
+                  <groupId>apache-log4j</groupId>
+                  <artifactId>log4j</artifactId>
+               </exclusion>
+               <exclusion>
+                  <groupId>apache-slide</groupId>
+                  <artifactId>webdavlib</artifactId>
+               </exclusion>
+               <exclusion>
+                  <groupId>apache-httpclient</groupId>
+                  <artifactId>commons-httpclient</artifactId>
+               </exclusion>
+            </exclusions>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>portal-test-generic</artifactId>
+            <version>${version.jboss.unit}</version>
+            <exclusions>
+              <exclusion>
+                <groupId>org.codehaus.cargo</groupId>
+                <artifactId>cargo-core-uberjar</artifactId>
+              </exclusion>
+              <exclusion>
+                  <groupId>hibernate</groupId>
+                  <artifactId>hibernate3</artifactId>
+              </exclusion>
+              <exclusion>
+                  <groupId>apache-log4j</groupId>
+                  <artifactId>log4j</artifactId>
+               </exclusion>
+            </exclusions>
+         </dependency>
       </dependencies>
    </dependencyManagement>
    

Modified: components/pc/trunk/test/servers/pom.xml
===================================================================
--- components/pc/trunk/test/servers/pom.xml	2011-08-13 22:10:10 UTC (rev 7076)
+++ components/pc/trunk/test/servers/pom.xml	2011-08-13 22:57:57 UTC (rev 7077)
@@ -43,26 +43,10 @@
       <dependency>
          <groupId>org.jboss.unit</groupId>
          <artifactId>jboss-unit</artifactId>
-         <exclusions>
-            <exclusion>
-               <groupId>cargo</groupId>
-               <artifactId>core</artifactId>
-            </exclusion>
-         </exclusions>
       </dependency>
       <dependency>
          <groupId>org.jboss.unit</groupId>
          <artifactId>jboss-unit-remote</artifactId>
-         <exclusions>
-            <exclusion>
-               <groupId>cargo</groupId>
-               <artifactId>core</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-httpclient</groupId>
-               <artifactId>commons-httpclient</artifactId>
-            </exclusion>
-         </exclusions>
       </dependency>
       <dependency>
          <groupId>org.jboss.unit</groupId>
@@ -71,38 +55,10 @@
       <dependency>
          <groupId>org.jboss.unit</groupId>
          <artifactId>portal-test</artifactId>
-         <exclusions>
-            <exclusion>
-               <groupId>hibernate</groupId>
-               <artifactId>hibernate3</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-log4j</groupId>
-               <artifactId>log4j</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-slide</groupId>
-               <artifactId>webdavlib</artifactId>
-            </exclusion>
-            <exclusion>
-               <groupId>apache-httpclient</groupId>
-               <artifactId>commons-httpclient</artifactId>
-            </exclusion>
-         </exclusions>
       </dependency>
       <dependency>
          <groupId>org.jboss.unit</groupId>
          <artifactId>portal-test-generic</artifactId>
-         <exclusions>
-            <exclusion>
-               <groupId>hibernate</groupId>
-               <artifactId>hibernate3</artifactId>
-           </exclusion>
-           <exclusion>
-               <groupId>apache-log4j</groupId>
-               <artifactId>log4j</artifactId>
-            </exclusion>
-         </exclusions>
       </dependency>
 
       <dependency>



More information about the gatein-commits mailing list