Search in sources :

Example 1 with MenuContainer

use of java.awt.MenuContainer in project bnd by bndtools.

the class PluginTest method testLoadPluginWithPath.

public void testLoadPluginWithPath() {
    Builder p = new Builder();
    p.setProperty(Constants.PLUGIN, "thinlet.Thinlet;path:=jar/thinlet.jar");
    List<MenuContainer> plugins = p.getPlugins(MenuContainer.class);
    assertEquals(0, p.getErrors().size());
    assertEquals(1, plugins.size());
    assertEquals("thinlet.Thinlet", plugins.get(0).getClass().getName());
}
Also used : Builder(aQute.bnd.osgi.Builder) MenuContainer(java.awt.MenuContainer)

Example 2 with MenuContainer

use of java.awt.MenuContainer in project bnd by bndtools.

the class PluginTest method testLoadPluginWithGlobalPluginPath.

public void testLoadPluginWithGlobalPluginPath() {
    Builder p = new Builder();
    p.setProperty(Constants.PLUGIN, "thinlet.Thinlet");
    p.setProperty(Constants.PLUGINPATH, "jar/thinlet.jar");
    List<MenuContainer> plugins = p.getPlugins(MenuContainer.class);
    assertEquals(0, p.getErrors().size());
    assertEquals(1, plugins.size());
    assertEquals("thinlet.Thinlet", plugins.get(0).getClass().getName());
}
Also used : Builder(aQute.bnd.osgi.Builder) MenuContainer(java.awt.MenuContainer)

Aggregations

Builder (aQute.bnd.osgi.Builder)2 MenuContainer (java.awt.MenuContainer)2