[jboss-svn-commits] JBoss Common SVN: r3964 - in shrinkwrap/trunk: extension-glassfish and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Jan 30 01:49:11 EST 2010


Author: ALRubinger
Date: 2010-01-30 01:49:10 -0500 (Sat, 30 Jan 2010)
New Revision: 3964

Added:
   shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/EchoBean.java
   shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/EchoLocalBusiness.java
   shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/GlassFishDeploymentUnitTestCase.java
   shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveUnitTestCase.java
Removed:
   shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveTestCase.java
Modified:
   shrinkwrap/trunk/build/pom.xml
   shrinkwrap/trunk/extension-glassfish/
   shrinkwrap/trunk/extension-glassfish/pom.xml
   shrinkwrap/trunk/extension-glassfish/src/main/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveImpl.java
Log:
[SHRINKWRAP-124] Add integration test for GFv3 EJB deployment based upon ShrinkWrap archive.  Move the Glassfish-specific configs to the integration component only.

Modified: shrinkwrap/trunk/build/pom.xml
===================================================================
--- shrinkwrap/trunk/build/pom.xml	2010-01-30 00:53:09 UTC (rev 3963)
+++ shrinkwrap/trunk/build/pom.xml	2010-01-30 06:49:10 UTC (rev 3964)
@@ -28,24 +28,9 @@
 
     <!-- Versioning -->
     <version.junit_junit>4.6</version.junit_junit>
-    <version.glassfish_api>3.0</version.glassfish_api>
 
   </properties>
 
-	<!-- Maven 2 Repositories -->
-	<repositories>
-		<repository>
-        	<id>java.dev.net.glassfish</id>
-        	<url>http://download.java.net/maven/glassfish</url>
-        	<releases>
-				<enabled>true</enabled>
-			</releases>
-        	<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-		</repository>
-	</repositories>
-
   <!-- SCM -->
   <scm>
     <connection>scm:svn:http://anonsvn.jboss.org/repos/common/shrinkwrap/trunk</connection>
@@ -162,13 +147,6 @@
   <dependencyManagement>
     <dependencies>
 
-		<dependency>
-			<groupId>org.glassfish.common</groupId>
-			<artifactId>glassfish-api</artifactId>
-			<version>${version.glassfish_api}</version>
-			<scope>provided</scope>
-		</dependency>
-
       <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>


Property changes on: shrinkwrap/trunk/extension-glassfish
___________________________________________________________________
Name: svn:ignore
   - target
.settings
.classpath
.project

   + target
.classpath
.settings
.project
gfembed*


Modified: shrinkwrap/trunk/extension-glassfish/pom.xml
===================================================================
--- shrinkwrap/trunk/extension-glassfish/pom.xml	2010-01-30 00:53:09 UTC (rev 3963)
+++ shrinkwrap/trunk/extension-glassfish/pom.xml	2010-01-30 06:49:10 UTC (rev 3964)
@@ -24,6 +24,9 @@
 
   <!-- Properties -->
   <properties>
+  
+    <!-- Versioning -->
+    <version.glassfish>3.0.1-b02</version.glassfish>
 
   </properties>
 
@@ -44,11 +47,6 @@
       <version>${project.version}</version>
     </dependency>
 
-	<dependency>
-		<groupId>org.glassfish.common</groupId>
-		<artifactId>glassfish-api</artifactId>
-	</dependency>
-
     <!-- 
     External Projects
      -->
@@ -57,35 +55,43 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    
+    <!-- org.glassfish --> 
+    <dependency>
+      <groupId>org.glassfish.common</groupId>
+      <artifactId>glassfish-api</artifactId>
+      <version>${version.glassfish}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.glassfish.extras</groupId>
+      <artifactId>glassfish-embedded-all</artifactId>
+      <version>${version.glassfish}</version>
+      <scope>test</scope>
+    </dependency>
 
   </dependencies>
 
   <!-- Build Configuration -->
   <build>
+  
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
 
-      <!-- Resources Plugin -->
-      <plugin>
-        <artifactId>maven-resources-plugin</artifactId>
-        <version>2.3</version> <!-- Required for empty dirs config to be used -->
-        <configuration>
-          <!-- For the importer tests, we must copy empty directories -->
-          <includeEmptyDirs>true</includeEmptyDirs>
-        </configuration>
-      </plugin>
-
     </plugins>
+    
   </build>
+  
+  <!-- Maven 2 Repositories -->
+  <repositories>
+    <repository>
+      <id>java.dev.net.glassfish</id>
+      <url>http://download.java.net/maven/glassfish</url>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
 </project>
 

Modified: shrinkwrap/trunk/extension-glassfish/src/main/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveImpl.java
===================================================================
--- shrinkwrap/trunk/extension-glassfish/src/main/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveImpl.java	2010-01-30 00:53:09 UTC (rev 3963)
+++ shrinkwrap/trunk/extension-glassfish/src/main/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveImpl.java	2010-01-30 06:49:10 UTC (rev 3964)
@@ -41,25 +41,27 @@
 import org.jboss.shrinkwrap.impl.base.io.IOUtil;
 
 /**
- * ShrinkWrap extension to support GlassFishs ReadableArchive.
+ * ShrinkWrap extension to support GlassFishs {@link ReadableArchive}
+ * backed by an {@link Archive}
  *
  * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
  * @version $Revision: $
  */
 public class ShrinkwrapReadableArchiveImpl extends AssignableBase implements ShrinkwrapReadableArchive
 {
-   private Archive<?> archive;
-   
+   private final Archive<?> archive;
+
    /**
     * @param archive
     */
-   public ShrinkwrapReadableArchiveImpl(Archive<?> archive)
+   public ShrinkwrapReadableArchiveImpl(final Archive<?> archive)
    {
       Validate.notNull(archive, "Archive must be specified");
       this.archive = archive;
    }
-   
-   /* (non-Javadoc)
+
+   /**
+    * {@inheritDoc}
     * @see org.jboss.shrinkwrap.impl.base.AssignableBase#getArchive()
     */
    @Override
@@ -90,7 +92,8 @@
       return true;
    }
 
-   /* (non-Javadoc)
+   /**
+    * {@inheritDoc}
     * @see org.glassfish.api.deployment.archive.ReadableArchive#exists(java.lang.String)
     */
    @Override
@@ -99,7 +102,8 @@
       return archive.contains(ArchivePaths.create(path));
    }
 
-   /* (non-Javadoc)
+   /**
+    * {@inheritDoc}
     * @see org.glassfish.api.deployment.archive.ReadableArchive#getEntry(java.lang.String)
     */
    @Override
@@ -108,7 +112,8 @@
       return archive.get(ArchivePaths.create(path)).openStream();
    }
 
-   /* (non-Javadoc)
+   /**
+    * {@inheritDoc}
     * @see org.glassfish.api.deployment.archive.ReadableArchive#getEntrySize(java.lang.String)
     */
    // TODO: ShrinkWrap have not know the size of a Asset. Hacking figure it out runtime. 
@@ -122,8 +127,8 @@
       {
          IOUtil.copyWithClose(asset.openStream(), output);
          return output.toByteArray().length;
-      } 
-      catch (IOException e) 
+      }
+      catch (IOException e)
       {
          throw new RuntimeException(e);
       }
@@ -150,7 +155,8 @@
    {
    }
 
-   /* (non-Javadoc)
+   /**
+    * {@inheritDoc}
     * @see org.glassfish.api.deployment.archive.ReadableArchive#getSubArchive(java.lang.String)
     */
    // TODO: We should support non ShrinkWrap nested Archives as well. ie: external jar files.
@@ -158,9 +164,9 @@
    public ReadableArchive getSubArchive(String path) throws IOException
    {
       Asset archiveAsset = archive.get(ArchivePaths.create(path));
-      if(archiveAsset instanceof ArchiveAsset)
+      if (archiveAsset instanceof ArchiveAsset)
       {
-         return ((ArchiveAsset)archiveAsset).getArchive().as(ShrinkwrapReadableArchive.class);
+         return ((ArchiveAsset) archiveAsset).getArchive().as(ShrinkwrapReadableArchive.class);
       }
       throw new IOException(path + " not a Archive");
    }
@@ -199,8 +205,8 @@
    public Enumeration<String> entries()
    {
       List<String> entries = new ArrayList<String>();
-      
-      for(Entry<ArchivePath, Asset> entry : archive.getContent().entrySet()) 
+
+      for (Entry<ArchivePath, Asset> entry : archive.getContent().entrySet())
       {
          entries.add(entry.getKey().get());
       }
@@ -214,10 +220,10 @@
    public Enumeration<String> entries(String path)
    {
       List<String> entries = new ArrayList<String>();
-      
-      for(Entry<ArchivePath, Asset> entry : archive.getContent().entrySet()) 
+
+      for (Entry<ArchivePath, Asset> entry : archive.getContent().entrySet())
       {
-         if(entry.getKey().get().startsWith(path))
+         if (entry.getKey().get().startsWith(path))
          {
             entries.add(entry.getKey().get());
          }
@@ -243,10 +249,10 @@
    public Collection<String> getDirectories() throws IOException
    {
       List<String> entries = new ArrayList<String>();
-      
-      for(Entry<ArchivePath, Asset> entry : archive.getContent().entrySet()) 
+
+      for (Entry<ArchivePath, Asset> entry : archive.getContent().entrySet())
       {
-         if(entry.getValue() == DirectoryAsset.INSTANCE)
+         if (entry.getValue() == DirectoryAsset.INSTANCE)
          {
             entries.add(entry.getKey().get());
          }
@@ -261,7 +267,7 @@
    public Manifest getManifest() throws IOException
    {
       ArchivePath manifestPath = ArchivePaths.create("META-INF/MANIFEST.MF");
-      if(archive.contains(manifestPath)) 
+      if (archive.contains(manifestPath))
       {
          return new Manifest(archive.get(manifestPath).openStream());
       }

Added: shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/EchoBean.java
===================================================================
--- shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/EchoBean.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/EchoBean.java	2010-01-30 06:49:10 UTC (rev 3964)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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 com.jboss.shrinkwrap.glassfish;
+
+import javax.ejb.Local;
+import javax.ejb.Stateless;
+
+/**
+ * 
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Local(EchoLocalBusiness.class)
+public class EchoBean implements EchoLocalBusiness
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   //-------------------------------------------------------------------------------------||
+   // Required Implementations -----------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * {@inheritDoc}
+    * @see com.jboss.shrinkwrap.glassfish.EchoLocalBusiness#echo(java.lang.String)
+    */
+   @Override
+   public String echo(final String value)
+   {
+      return value;
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Functional Methods -----------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   //-------------------------------------------------------------------------------------||
+   // Internal Helper Methods ------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+}

Added: shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/EchoLocalBusiness.java
===================================================================
--- shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/EchoLocalBusiness.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/EchoLocalBusiness.java	2010-01-30 06:49:10 UTC (rev 3964)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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 com.jboss.shrinkwrap.glassfish;
+
+/**
+ * 
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface EchoLocalBusiness
+{
+   String echo(String value);
+}

Added: shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/GlassFishDeploymentUnitTestCase.java
===================================================================
--- shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/GlassFishDeploymentUnitTestCase.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/GlassFishDeploymentUnitTestCase.java	2010-01-30 06:49:10 UTC (rev 3964)
@@ -0,0 +1,183 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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 com.jboss.shrinkwrap.glassfish;
+
+import java.util.logging.Logger;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.glassfish.api.deployment.DeployCommandParameters;
+import org.glassfish.api.embedded.ContainerBuilder;
+import org.glassfish.api.embedded.EmbeddedContainer;
+import org.glassfish.api.embedded.EmbeddedDeployer;
+import org.glassfish.api.embedded.EmbeddedFileSystem;
+import org.glassfish.api.embedded.LifecycleException;
+import org.glassfish.api.embedded.Server;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Integration test ensuring that Deployment of a
+ * ShrinkWrap {@link Archive} into GlassFish 
+ * works properly
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class GlassFishDeploymentUnitTestCase
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Logger
+    */
+   private static final Logger log = Logger.getLogger(GlassFishDeploymentUnitTestCase.class.getName());
+
+   /**
+    * Embedded GFv3 Server
+    */
+   private static Server server;
+
+   /**
+    * Deployer to accept {@link Archive}s
+    */
+   private static EmbeddedDeployer deployer;
+
+   /**
+    * JNDI Context
+    */
+   private static Context namingContext;
+
+   /**
+    * Name of the deployment
+    */
+   private static final String NAME_DEPLOYMENT = "slsb.jar";
+
+   /**
+    * Name in JNDI under which the test EJB will be registered 
+    */
+   private static final String NAME_JNDI = "java:global/" + NAME_DEPLOYMENT + "/" + EchoBean.class.getSimpleName()
+         + "!" + EchoLocalBusiness.class.getName();
+
+   /**
+    * EJB Archive to be deployed
+    */
+   private static final ShrinkwrapReadableArchive archive;
+   static
+   {
+      archive = Archives.create(NAME_DEPLOYMENT, JavaArchive.class).addClasses(EchoLocalBusiness.class, EchoBean.class)
+            .as(ShrinkwrapReadableArchive.class);
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Lifecycle --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Configures and starts the Embedded GFv3 server
+    */
+   @BeforeClass
+   public static void startServer() throws LifecycleException, NamingException
+   {
+      // Create a builder for the Server
+      final Server.Builder builder = new Server.Builder(null);
+
+      // Build the server from an Embedded FS
+      final EmbeddedFileSystem.Builder embeddedFsBuilder = new EmbeddedFileSystem.Builder();
+      final EmbeddedFileSystem embeddedFs = embeddedFsBuilder.build();
+      builder.embeddedFileSystem(embeddedFs);
+      server = builder.build();
+
+      // Add an EJB Container
+      final ContainerBuilder<EmbeddedContainer> containerBuilder = server.createConfig(ContainerBuilder.Type.ejb);
+      server.addContainer(containerBuilder);
+
+      // Set the deployer
+      deployer = server.getDeployer();
+
+      // Set the naming context
+      namingContext = new InitialContext();
+
+   }
+
+   @AfterClass
+   public static void stopServer() throws LifecycleException
+   {
+      server.stop();
+   }
+
+   /**
+    * Deploys the EJB into the server
+    * @throws Exception
+    */
+   @Before
+   public void deploy()
+   {
+
+      final DeployCommandParameters params = new DeployCommandParameters();
+      params.name = NAME_DEPLOYMENT;
+      deployer.deploy(archive, params);
+   }
+
+   /**
+    * Undeploys the EJB from the server
+    * @throws Exception
+    */
+   @After
+   public void undeploy()
+   {
+      deployer.undeploy(NAME_DEPLOYMENT, null);
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Tests ------------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Ensures the EJB can be looked up in JNDI and invoked upon, proving
+    * the deployment was a success
+    */
+   @Test
+   public void testSlsb() throws NamingException
+   {
+      // Get the proxy
+      final EchoLocalBusiness bean = (EchoLocalBusiness) namingContext.lookup(NAME_JNDI);
+
+      // Define the expected return value
+      final String expected = "ShrinkWrap>GlassFish (booyeah)";
+
+      // Invoke
+      final String received = bean.echo(expected);
+
+      // Test
+      log.info("Got: " + received);
+      TestCase.assertEquals("Result was not as expected", expected, received);
+   }
+}

Deleted: shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveTestCase.java
===================================================================
--- shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveTestCase.java	2010-01-30 00:53:09 UTC (rev 3963)
+++ shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveTestCase.java	2010-01-30 06:49:10 UTC (rev 3964)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed 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 com.jboss.shrinkwrap.glassfish;
-
-import junit.framework.Assert;
-
-import org.jboss.shrinkwrap.api.Archives;
-import org.junit.Test;
-
-
-/**
- * ShrinkwrapReadableArchiveTestCase
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public class ShrinkwrapReadableArchiveTestCase
-{
-   @Test
-   public void shouldBeAbleToLoadExtension() throws Exception 
-   {
-      ShrinkwrapReadableArchive archive = Archives.create("test", ShrinkwrapReadableArchive.class);
-      Assert.assertNotNull(archive);
-   }
-}

Copied: shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveUnitTestCase.java (from rev 3963, shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveTestCase.java)
===================================================================
--- shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveUnitTestCase.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-glassfish/src/test/java/com/jboss/shrinkwrap/glassfish/ShrinkwrapReadableArchiveUnitTestCase.java	2010-01-30 06:49:10 UTC (rev 3964)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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 com.jboss.shrinkwrap.glassfish;
+
+import junit.framework.Assert;
+
+import org.jboss.shrinkwrap.api.Archives;
+import org.junit.Test;
+
+
+/**
+ * ShrinkwrapReadableArchiveTestCase
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public class ShrinkwrapReadableArchiveUnitTestCase
+{
+   @Test
+   public void shouldBeAbleToLoadExtension() throws Exception 
+   {
+      ShrinkwrapReadableArchive archive = Archives.create("test", ShrinkwrapReadableArchive.class);
+      Assert.assertNotNull(archive);
+   }
+}



More information about the jboss-svn-commits mailing list