public void testBundles2() throws Exception
{
ModManager manager = new ModManager(base);
MyConfig a1 = new MyConfig( SimpleActivator.class.getCanonicalName(), new XmlConfig( null, MXml.loadXml("<c/>").getDocumentElement() ) );
MyConfig a2 = new MyConfig( SimpleActivator.class.getCanonicalName(), new XmlConfig( null, MXml.loadXml("<c/>").getDocumentElement() ) );
IModConfig[] ac1 = new IModConfig[] { a1, a2 };
MyBundle b1 = new MyBundle("mybundle", false, ac1 );
List<IModActivator> activators1 = new LinkedList<IModActivator>();
manager.initializeBundle(b1,activators1);
assertTrue( activators1.size() == 2 );
assertTrue( manager.getActivators().size() == 2 );
IModActivator act1 = activators1.get(0);
assertTrue( act1.getStatus() == IModActivator.STATUS.INITIALIZED );
manager.enableActivators(activators1);
assertTrue( act1.getStatus() == IModActivator.STATUS.ENABLED );
manager.disableActivators(activators1);
MyConfig a3 = new MyConfig( SimpleActivator.class.getCanonicalName(), new XmlConfig( null, MXml.loadXml("<c/>").getDocumentElement() ) );
MyConfig a4 = new MyConfig( SimpleActivator.class.getCanonicalName(), new XmlConfig( null, MXml.loadXml("<c/>").getDocumentElement() ) );
IModConfig[] ac2 = new IModConfig[] { a3, a4 };
MyBundle b2 = new MyBundle("mybundle", false, ac2 );
List<IModActivator> activators2 = new LinkedList<IModActivator>();
manager.initializeBundle(b2,activators2);