[jboss-cvs] JBossAS SVN: r81292 - in projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans: test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 19 10:27:08 EST 2008


Author: alesj
Date: 2008-11-19 10:27:08 -0500 (Wed, 19 Nov 2008)
New Revision: 81292

Modified:
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscoveryDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java
Log:
Simple fixes.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscoveryDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscoveryDeployer.java	2008-11-19 15:26:07 UTC (rev 81291)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscoveryDeployer.java	2008-11-19 15:27:08 UTC (rev 81292)
@@ -21,10 +21,9 @@
  */
 package org.jboss.test.deployers.vfs.webbeans.support;
 
+import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import org.jboss.classloading.spi.dependency.Module;
 import org.jboss.classloading.spi.visitor.ClassFilter;
@@ -119,9 +118,9 @@
       List<VirtualFile> classpath = unit.getClassPath();
       if (classpath != null && classpath.isEmpty() == false)
       {
-         Set<VirtualFile> matching = new HashSet<VirtualFile>();
+         List<VirtualFile> matching = new ArrayList<VirtualFile>();
          VirtualFile root = unit.getRoot();
-         for (VirtualFile cp : classpath)
+         for (VirtualFile cp : classpath)                        
          {
             VirtualFile check = cp;
             while(check != null && check.equals(root) == false)

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java	2008-11-19 15:26:07 UTC (rev 81291)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java	2008-11-19 15:27:08 UTC (rev 81292)
@@ -65,12 +65,12 @@
          assertNotNull(wbDiscovery);
 
          Set<String> expected = new HashSet<String>();
-         expected.add("ejbs.jar/META-INF");
-         expected.add("ext.jar/META-INF");
-         expected.add("simple.jar/META-INF");
-         expected.add("ui.jar/META-INF");
-         expected.add("simple.war/WEB-INF");
-         expected.add("crm.jar/META-INF");
+         addExpectedClass(expected, "ejbs.jar");
+         addExpectedClass(expected, "ext.jar");
+         addExpectedClass(expected, "simple.jar");
+         addExpectedClass(expected, "ui.jar");
+         addExpectedClass(expected, "crm.jar");
+         addExpectedClass(expected, "simple.war", "/WEB-INF/web-beans.xml");
 
          for (URL url : wbDiscovery.discoverWebBeansXml())
          {
@@ -110,6 +110,16 @@
       }
    }
 
+   private static void addExpectedClass(Set<String> expected, String unit)
+   {
+      addExpectedClass(expected, unit, "/META-INF/web-beans.xml");
+   }
+
+   private static void addExpectedClass(Set<String> expected, String unit, String suffix)
+   {
+      expected.add(unit + suffix);
+   }
+
    private static void addExpectedClass(Set<String> expected, Class<?> clazz)
    {
       expected.add(clazz.getName());




More information about the jboss-cvs-commits mailing list