Examples of IModActivator


Examples of de.mhus.framework.mod.IModActivator

      IModConfig[] ac1 = new IModConfig[] { a1 };
      MyBundle b1 = new MyBundle("mybundle", true, ac1 );
     
      List<IModActivator> activators = new LinkedList<IModActivator>();
      manager.initializeBundle(b1,activators);
      IModActivator act = activators.get(0);
      assertTrue( act.getStatus() == IModActivator.STATUS.INITIALIZED );
      manager.enableActivators(activators);
      assertTrue( act.getStatus() == IModActivator.STATUS.ENABLED );
      manager.disableActivators(activators);
      assertTrue( act.getStatus() == IModActivator.STATUS.DISABLED );
      manager.disposeActivators(activators);
      assertTrue( act.getStatus() == IModActivator.STATUS.CLOSED );
     
    }
View Full Code Here

Examples of de.mhus.framework.mod.IModActivator

      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);
      assertTrue( activators2.size() == 2 );     
      assertTrue( manager.getActivators().size() == 4 );
     
      IModActivator act2 = activators2.get(0);
      assertTrue( act2.getStatus() == IModActivator.STATUS.INITIALIZED );
      manager.enableActivators(activators2);
      assertTrue( act2.getStatus() == IModActivator.STATUS.ENABLED );
      manager.disableActivators(activators2);
     
      assertTrue( act1.getStatus() == IModActivator.STATUS.DISABLED );
      manager.disposeActivators(activators1);
      assertTrue( act1.getStatus() == IModActivator.STATUS.CLOSED );

      assertTrue( act2.getStatus() == IModActivator.STATUS.DISABLED );
      manager.disposeActivators(activators2);
      assertTrue( act2.getStatus() == IModActivator.STATUS.CLOSED );
     
      assertTrue( manager.getActivators().size() == 0 );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.