Search in sources :

Example 6 with OSGiRepository

use of aQute.bnd.repository.osgi.OSGiRepository in project bnd by bndtools.

the class StandaloneTest method testMultipleUrls.

public void testMultipleUrls() throws Exception {
    File f = IO.getFile("testdata/standalone/multi.bndrun");
    Run run = Run.createRun(null, f);
    List<Repository> repositories = run.getWorkspace().getPlugins(Repository.class);
    assertEquals(2, repositories.size());
    assertTrue(repositories.get(0) instanceof OSGiRepository);
    assertTrue(repositories.get(1) instanceof OSGiRepository);
    OSGiRepository f0 = (OSGiRepository) repositories.get(0);
    assertEquals("repo01", f0.getName());
    assertEquals("http://example.org/index1.xml", f0.getLocation());
    OSGiRepository f1 = (OSGiRepository) repositories.get(1);
    assertEquals("second", f1.getName());
    assertEquals("http://example.org/index2.xml", f1.getLocation());
}
Also used : OSGiRepository(aQute.bnd.repository.osgi.OSGiRepository) Repository(org.osgi.service.repository.Repository) OSGiRepository(aQute.bnd.repository.osgi.OSGiRepository) Run(aQute.bnd.build.Run) File(java.io.File)

Aggregations

OSGiRepository (aQute.bnd.repository.osgi.OSGiRepository)6 Run (aQute.bnd.build.Run)5 File (java.io.File)5 Repository (org.osgi.service.repository.Repository)5 ResourcesRepository (aQute.bnd.osgi.repository.ResourcesRepository)1 HashMap (java.util.HashMap)1