Search in sources :

Example 1 with PriorityService

use of org.exoplatform.mocks.PriorityService in project kernel by exoplatform.

the class TestContainer method testPriorityPlugins.

public void testPriorityPlugins() {
    RootContainer rootContainer = RootContainer.getInstance();
    PortalContainer pcontainer = rootContainer.getPortalContainer("portal");
    assertNotNull(pcontainer);
    PriorityService ps = (PriorityService) pcontainer.getComponentInstanceOfType(PriorityService.class);
    assertNotNull(ps);
    List<ComponentPlugin> l = ps.getPlugins();
    assertNotNull(l);
    assertEquals(3, l.size());
    assertEquals("PluginPriority3", l.get(0).getName());
    assertEquals("PluginPriority1", l.get(1).getName());
    assertEquals("PluginPriority2", l.get(2).getName());
}
Also used : ComponentPlugin(org.exoplatform.container.component.ComponentPlugin) PriorityService(org.exoplatform.mocks.PriorityService) RootContainer(org.exoplatform.container.RootContainer) PortalContainer(org.exoplatform.container.PortalContainer)

Aggregations

PortalContainer (org.exoplatform.container.PortalContainer)1 RootContainer (org.exoplatform.container.RootContainer)1 ComponentPlugin (org.exoplatform.container.component.ComponentPlugin)1 PriorityService (org.exoplatform.mocks.PriorityService)1