コード例 #1
0
 private static Project testBuildAll(String dependsOn, int count) throws Exception {
   Workspace ws = new Workspace(new File("test/ws"));
   Project all = ws.getProject("build-all");
   all.setProperty("-dependson", dependsOn);
   all.prepare();
   Collection<Project> dependson = all.getDependson();
   assertEquals(count, dependson.size());
   return all;
 }
コード例 #2
0
 /** Duplicates in runbundles gave a bad error, should be ignored */
 public static void testRunbundleDuplicates() throws Exception {
   Workspace ws = new Workspace(new File("test/ws"));
   Project top = ws.getProject("p1");
   top.clear();
   top.setProperty("-runbundles", "org.apache.felix.configadmin,org.apache.felix.configadmin");
   Collection<Container> runbundles = top.getRunbundles();
   assertTrue(top.check("Multiple bundles with the same final URL"));
   assertNotNull(runbundles);
   assertEquals(1, runbundles.size());
 }
コード例 #3
0
 /** Test 2 equal bsns but diff. versions */
 public static void testSameBsnRunBundles() throws Exception {
   Workspace ws = new Workspace(new File("test/ws"));
   Project top = ws.getProject("p1");
   top.setProperty(
       "-runbundles",
       "org.apache.felix.configadmin;version='[1.0.1,1.0.1]',org.apache.felix.configadmin;version='[1.1.0,1.1.0]'");
   Collection<Container> runbundles = top.getRunbundles();
   assertTrue(top.check());
   assertNotNull(runbundles);
   assertEquals(2, runbundles.size());
 }
コード例 #4
0
 /** Test bnd.bnd of project `foo`: `-runbundles: foo;version=latest` */
 public static void testRunBundlesContainsSelf() throws Exception {
   Workspace ws = new Workspace(new File("test/ws"));
   Project top = ws.getProject("p1");
   top.setProperty("-runbundles", "p1;version=latest");
   top.setChanged();
   top.isStale();
   Collection<Container> runbundles = top.getRunbundles();
   assertTrue(top.check("Circular dependency"));
   assertNotNull(runbundles);
   assertEquals(0, runbundles.size());
 }