Author: pete.muir(a)jboss.org
Date: 2009-03-18 15:32:38 -0400 (Wed, 18 Mar 2009)
New Revision: 2095
Added:
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DummyExtraPackageSpecifiedTest.java
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/subpackage/Vole.java
Modified:
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DeclarativeStandaloneTest.java
Log:
Add ability to specify additional packages to include
Modified:
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DeclarativeStandaloneTest.java
===================================================================
---
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DeclarativeStandaloneTest.java 2009-03-18
19:31:44 UTC (rev 2094)
+++
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DeclarativeStandaloneTest.java 2009-03-18
19:32:38 UTC (rev 2095)
@@ -2,6 +2,8 @@
import java.io.File;
import java.io.FilenameFilter;
+import java.util.Arrays;
+import java.util.List;
import org.jboss.testharness.api.Configuration;
import org.jboss.testharness.impl.packaging.ArtifactGenerator;
@@ -103,6 +105,21 @@
}
@Test
+ public void testClassesPackageSpecifiedArtifact() throws Exception
+ {
+ TCKArtifactDescriptor artifact = new
ArtifactGenerator(standaloneConfiguration).createArtifact(DummyExtraPackageSpecifiedTest.class);
+ File root = artifact.getExplodedJar();
+ File currentPackage = getCurrentPackageAsFile(root);
+ List<String> currentPackageFileNames = Arrays.asList(currentPackage.list());
+ assert
currentPackageFileNames.contains(DummyExtraPackageSpecifiedTest.class.getSimpleName() +
".class");
+ File subPackage = new File(currentPackage, "subpackage");
+ List<String> subPackageFileNames = Arrays.asList(subPackage.list());
+ assert subPackageFileNames.size() == 2;
+ assert subPackageFileNames.contains("Rat.class");
+ assert subPackageFileNames.contains("Vole.class");
+ }
+
+ @Test
public void testResourcesSpecifiedArtifact() throws Exception
{
TCKArtifactDescriptor artifact = new
ArtifactGenerator(standaloneConfiguration).createArtifact(DummyResourcesSpecifiedTest.class);
Added:
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DummyExtraPackageSpecifiedTest.java
===================================================================
---
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DummyExtraPackageSpecifiedTest.java
(rev 0)
+++
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DummyExtraPackageSpecifiedTest.java 2009-03-18
19:32:38 UTC (rev 2095)
@@ -0,0 +1,17 @@
+package org.jboss.testharness.test.impl.packaging.declarative.standalone;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
+
+
+@Artifact
+(a)Classes(packages="org.jboss.testharness.test.impl.packaging.declarative.standalone.subpackage")
+class DummyExtraPackageSpecifiedTest
+{
+
+ public void test()
+ {
+ assert true;
+ }
+
+}
Property changes on:
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/DummyExtraPackageSpecifiedTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/subpackage/Vole.java
===================================================================
---
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/subpackage/Vole.java
(rev 0)
+++
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/subpackage/Vole.java 2009-03-18
19:32:38 UTC (rev 2095)
@@ -0,0 +1,6 @@
+package org.jboss.testharness.test.impl.packaging.declarative.standalone.subpackage;
+
+public class Vole
+{
+
+}
Property changes on:
test-harness/trunk/tests/src/test/java/org/jboss/testharness/test/impl/packaging/declarative/standalone/subpackage/Vole.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Show replies by date