tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r761806 - in /tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test: java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java resources/repository/simple-app.ear
Date Fri, 03 Apr 2009 21:28:05 GMT
Author: vamsic007
Date: Fri Apr  3 21:28:04 2009
New Revision: 761806

URL: http://svn.apache.org/viewvc?rev=761806&view=rev
Log:
TUSCANY-2935 Integration tests for Java EE contribution processing
 o Test Enhanced EAR containing non-enhanced WAR, non-enhanced EJB JAR.

Added:
    tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/resources/repository/simple-app.ear
  (with props)
Modified:
    tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java

Modified: tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java?rev=761806&r1=761805&r2=761806&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java
(original)
+++ tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/ContributionServiceTestCase.java
Fri Apr  3 21:28:04 2009
@@ -56,6 +56,7 @@
     private static final String WAR_W_DEPLOYABLE_CONTRIBUTION = "/repository/helloworld-web-w-dep.war";
     private static final String EAR_CONTRIBUTION = "/repository/helloworld-ejb.ear";
     private static final String EAR_NONENHANCED_CONTRIBUTION = "/repository/simple-app-ear.jar";
+    private static final String EAR_ENHANCED_16_CONTRIBUTION = "/repository/simple-app.ear";
  
 
     private ClassLoader cl;
@@ -262,4 +263,26 @@
         Assert.assertEquals("Number of services", 2, jeeImpl.getServices().size());
         Assert.assertEquals("Number of references", 1, jeeImpl.getReferences().size());
     }
+
+    /**
+     * This method tests an EAR as a contribution.
+     * Enhanced EAR containing non-enhanced WAR, non-enhanced EJB JAR.
+     */
+    @Test
+    public void testContributeEAR_Enhanced16() throws Exception {
+        URL contributionLocation = getClass().getResource(EAR_ENHANCED_16_CONTRIBUTION);
+        String contributionId = CONTRIBUTION_001_ID;
+        contributionService.contribute(contributionId, contributionLocation, false);
+        Contribution contribution = contributionService.getContribution(contributionId);
+        Assert.assertNotNull(contribution);
+        List<Composite> deployables = contribution.getDeployables();
+        Assert.assertEquals("Deployable composites", 1, deployables.size());
+        Composite composite = deployables.get(0);
+        Assert.assertEquals("Number of components", 1, composite.getComponents().size());
+        Component component = composite.getComponents().get(0);
+        Assert.assertTrue("Component with implementation.jee", component.getImplementation()
instanceof JEEImplementation);
+        JEEImplementation jeeImpl = (JEEImplementation)component.getImplementation();
+        Assert.assertEquals("Number of services", 2, jeeImpl.getServices().size());
+        Assert.assertEquals("Number of references", 1, jeeImpl.getReferences().size());
+    }
 }

Added: tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/resources/repository/simple-app.ear
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/resources/repository/simple-app.ear?rev=761806&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/resources/repository/simple-app.ear
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message