[webbeans-commits] Webbeans SVN: r1463 - in tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging: declarativeArtifact and 1 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Feb 8 17:52:28 EST 2009


Author: pete.muir at jboss.org
Date: 2009-02-08 17:52:28 -0500 (Sun, 08 Feb 2009)
New Revision: 1463

Removed:
   tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/artifactScanner/
   tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/declarativeArtifact/unspecified/
   tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/subpackages/
Modified:
   tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/scanner/ArtifactScannerTest.java
Log:
artifactscanner tests

Modified: tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/scanner/ArtifactScannerTest.java
===================================================================
--- tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/scanner/ArtifactScannerTest.java	2009-02-08 22:44:55 UTC (rev 1462)
+++ tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/scanner/ArtifactScannerTest.java	2009-02-08 22:52:28 UTC (rev 1463)
@@ -5,6 +5,7 @@
 import java.util.Set;
 
 import org.jboss.jsr299.tck.api.Configuration;
+import org.jboss.jsr299.tck.impl.packaging.ArtifactDescriptor;
 import org.jboss.jsr299.tck.impl.packaging.ArtifactGenerator;
 import org.jboss.jsr299.tck.impl.packaging.ArtifactScanner;
 import org.jboss.jsr299.tck.test.impl.mock.MockConfiguration;
@@ -34,11 +35,30 @@
          @Override
          public List<String> getInContainerTestPackageNames()
          {
-            return Arrays.asList("org.jboss.seam.packaging.scanner");
+            return Arrays.asList("org.jboss.jsr299.tck.test.impl.packaging.scanner");
          }
          
       };
       ArtifactGenerator generator = new ArtifactGenerator(configuration);
+      List<ArtifactDescriptor> artifacts = generator.createArtifacts();
+      assert artifacts.size() == 2;
+      for (ArtifactDescriptor artifact : artifacts)
+      {
+         if (artifact.getDeclaringClass().equals(DummyArtifact.class))
+         {
+            assert artifact.getClasses().contains(ArtifactScannerTest.class);
+            assert artifact.getClasses().contains(DummyArtifact.class);
+            assert !artifact.getClasses().contains(AnotherDummyArtifact.class);
+            assert !artifact.getClasses().contains(NotAnArtifact.class);
+         }
+         if (artifact.getDeclaringClass().equals(AnotherDummyArtifact.class))
+         {
+            assert !artifact.getClasses().contains(ArtifactScannerTest.class);
+            assert !artifact.getClasses().contains(DummyArtifact.class);
+            assert artifact.getClasses().contains(AnotherDummyArtifact.class);
+            assert artifact.getClasses().contains(NotAnArtifact.class); 
+         }
+      }
    }
    
    




More information about the weld-commits mailing list