]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.osgiboot/src/test/java/org/argeo/slc/osgiboot/OsgiBootNoRuntimeTest.java
aab5799bdf1ddfcb902e5cd79cc084adc1fe9c84
1 package org
.argeo
.slc
.osgiboot
;
6 import junit
.framework
.TestCase
;
8 import org
.argeo
.slc
.osgiboot
.OsgiBoot
;
10 public class OsgiBootNoRuntimeTest
extends TestCase
{
11 public final static String BUNDLES
= "src/test/bundles/some;in=*;ex=excluded,"
12 + "src/test/bundles/others;in=**/org.argeo.*";
14 public void testLocations() {
15 String baseUrl
= "file:";
16 String locations
= "/mydir/myfile" + File
.pathSeparator
17 + "/myotherdir/myotherfile";
19 OsgiBoot osgiBoot
= new OsgiBoot(null);
20 List urls
= osgiBoot
.getLocationsUrls(baseUrl
, locations
);
21 assertEquals(2, urls
.size());
22 assertEquals("file:/mydir/myfile", urls
.get(0));
23 assertEquals("file:/myotherdir/myotherfile", urls
.get(1));
26 public void testBundles() {
27 String baseUrl
= "file:";
28 String bundles
= BUNDLES
;
29 OsgiBoot osgiBoot
= new OsgiBoot(null);
30 List urls
= osgiBoot
.getBundlesUrls(baseUrl
, bundles
);
31 for (int i
= 0; i
< urls
.size(); i
++)
32 System
.out
.println(urls
.get(i
));
33 assertEquals(3, urls
.size());