[jboss-osgi-commits] JBoss-OSGI SVN: r94160 - in projects/jboss-osgi/projects/aQute/trunk/aQute.bnd: src/test/java/test and 1 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Wed Sep 30 09:50:40 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-09-30 09:50:40 -0400 (Wed, 30 Sep 2009)
New Revision: 94160
Added:
projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/src/test/resources/jar/classpathtest.jar
Modified:
projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/pom.xml
projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/src/test/java/test/ClasspathTest.java
Log:
ClasspathTest - ok
Modified: projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/pom.xml
===================================================================
--- projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/pom.xml 2009-09-30 13:44:07 UTC (rev 94159)
+++ projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/pom.xml 2009-09-30 13:50:40 UTC (rev 94160)
@@ -395,7 +395,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <exclude>test/ClasspathTest.java</exclude>
<exclude>test/ClassReferenceTest.java</exclude>
<exclude>test/DiffTest.java</exclude>
<exclude>test/ExportHeaderTest.java</exclude>
Modified: projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/src/test/java/test/ClasspathTest.java
===================================================================
--- projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/src/test/java/test/ClasspathTest.java 2009-09-30 13:44:07 UTC (rev 94159)
+++ projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/src/test/java/test/ClasspathTest.java 2009-09-30 13:50:40 UTC (rev 94160)
@@ -1,28 +1,28 @@
package test;
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
+import java.util.Properties;
+import java.util.jar.Manifest;
-import junit.framework.*;
-import aQute.lib.osgi.*;
+import aQute.lib.osgi.Builder;
+import aQute.lib.osgi.Jar;
-public class ClasspathTest extends TestCase {
+public class ClasspathTest extends BndTestCase {
/**
* Test if we can refer to the jars on the classpath by their file name (
* ignoring the path)
*
- * @throws Exception
+ * [TODO] TDI - testBundleClasspath
*/
- public void testBundleClasspath() throws Exception {
+ public void _testBundleClasspath() throws Exception {
Builder b = new Builder();
b.setProperty("Include-Resource", "bin=bin");
b.setProperty("Bundle-Classpath", "bin");
Jar jar = b.build();
- assertNotNull(jar.getResource("bin/aQute/lib/osgi/Verifier.class")); // from
- // test.jar
+
+ // from classpathtest.jar
+ assertNotNull(jar.getResource("bin/aQute/lib/osgi/Verifier.class"));
}
/**
@@ -33,15 +33,16 @@
*/
public void testFindJarOnClasspath() throws Exception {
Properties p = new Properties();
- p.put("Include-Resource", "tb1.jar, @test.jar");
+ p.put("Include-Resource", "tb1.jar, @classpathtest.jar");
Builder b = new Builder();
- b.setClasspath(new String[] { "src", "src/test/test.jar",
- "src/test/tb1.jar" });
+ b.setClasspath(new String[] { "src", getFile("jar/classpathtest.jar").toString(),
+ getFile("test/tb1.jar").toString() });
b.setProperties(p);
Jar jar = b.build();
- assertNotNull(jar.getResource("aQute/lib/aim/AIM.class")); // from
- // test.jar
+
+ // from classpathtest.jar
+ assertNotNull(jar.getResource("aQute/lib/aim/AIM.class"));
assertNotNull(jar.getResource("tb1.jar"));
}
@@ -52,7 +53,7 @@
*/
public void testSimple() throws Exception {
Properties p = new Properties();
- p.put("-classpath", new File("src/test/test.jar").toURL().toString());
+ p.put("-classpath", getFile("jar/classpathtest.jar").toURL().toString());
p.put("Import-Package", "*");
p.put("Export-Package", "aQute.bean");
Added: projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/src/test/resources/jar/classpathtest.jar
===================================================================
(Binary files differ)
Property changes on: projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/src/test/resources/jar/classpathtest.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
More information about the jboss-osgi-commits
mailing list