Examples of ToolManager


Examples of fr.imag.adele.apam.pax.test.grant.impl.ToolManager

      System.out.println("Contains : " + inst.getName());
    }
    System.out.println();

    Assert.assertNotNull("DayState is not found in the composite", dayinst);
    ToolManager manager = (ToolManager) managerinst.getServiceObject();
    DayState state = (DayState) dayinst.getServiceObject();

    ThreadWrapper_grant thread = new ThreadWrapper_grant(worker1);

    System.out.println(">19h : afternoon !");

    state.setHour(19);
    thread = new ThreadWrapper_grant(worker1);
    thread.setDaemon(true);
    thread.start();

    apam.waitForIt(1000);
    Assert.assertFalse(
        "As the JackHammer is granted (afternoon), the worker resolution should be ok -> thread should be ended",
        thread.isAlive());

    System.out.println(">23h : night !");
    state.setHour(23);
    thread = new ThreadWrapper_grant(worker1);
    thread.setDaemon(true);
    thread.start();

    apam.waitForIt(1000);
    ;
    manager.printTools();
    Assert.assertTrue(
        "As the JackHammer is not granted (night again), the worker resolution should fail -> thread should be waiting",
        thread.isAlive());
  }
View Full Code Here

Examples of fr.imag.adele.apam.pax.test.grant.impl.ToolManager

      System.out.println("Contains : " + inst.getName());
    }
    System.out.println();

    Assert.assertNotNull("DayState is not found in the composite", dayinst);
    ToolManager manager = (ToolManager) managerinst.getServiceObject();
    DayState state = (DayState) dayinst.getServiceObject();

    ThreadWrapper_grant thread = new ThreadWrapper_grant(worker1);

    System.out.println(">Init : night !");
    thread.setDaemon(true);
    thread.start();

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertTrue(
        "As the JackHammer is not granted(night), the worker resolution should fails -> thread should be waiting",
        thread.isAlive());

    System.out.println(">9h : morning !");
    state.setHour(9);

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertFalse(
        "As the JackHammer is granted (morning), the worker resolution should be ok -> thread should be ended",
        thread.isAlive());
  }
View Full Code Here

Examples of fr.imag.adele.apam.pax.test.grant.impl.ToolManager

      System.out.println("Contains : " + inst.getName());
    }
    System.out.println();

    Assert.assertNotNull("DayState is not found in the composite", dayinst);
    ToolManager manager = (ToolManager) managerinst.getServiceObject();
    DayState state = (DayState) dayinst.getServiceObject();

    ThreadWrapper_grant thread = new ThreadWrapper_grant(worker1);

    System.out.println(">Init : night !");
    thread.setDaemon(true);
    thread.start();

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertTrue(
        "As the JackHammer is not granted(night), the worker resolution should fails -> thread should be waiting",
        thread.isAlive());

    System.out.println(">9h : morning !");
    state.setHour(9);

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertFalse(
        "As the JackHammer is granted (morning), the worker resolution should be ok, EVEN if instance is external -> thread should be ended",
        thread.isAlive());
  }
View Full Code Here

Examples of fr.imag.adele.apam.pax.test.grant.impl.ToolManager

      System.out.println("Contains : " + inst.getName());
    }
    System.out.println();

    Assert.assertNotNull("DayState is not found in the composite", dayinst);
    ToolManager manager = (ToolManager) managerinst.getServiceObject();
    DayState state = (DayState) dayinst.getServiceObject();

    ThreadWrapper_grant thread = new ThreadWrapper_grant(worker1);

    System.out.println(">Init : night !");
    thread.setDaemon(true);
    thread.start();

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertTrue(
        "As the JackHammer is not granted(night), the worker resolution should fails -> thread should be waiting",
        thread.isAlive());

    System.out.println(">9h : morning !");
    state.setHour(9);

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertFalse(
        "As the JackHammer is granted (morning), the worker resolution should be ok -> thread should be ended",
        thread.isAlive());
  }
View Full Code Here

Examples of fr.imag.adele.apam.pax.test.grant.impl.ToolManager

      System.out.println("Contains : " + inst.getName());
    }
    System.out.println();

    Assert.assertNotNull("DayState is not found in the composite", dayinst);
    ToolManager manager = (ToolManager) managerinst.getServiceObject();
    DayState state = (DayState) dayinst.getServiceObject();
    // manager.printTools();
    state.setHour(4);

    ThreadWrapper_grant thread = new ThreadWrapper_grant(worker1);

    System.out.println(">Init : night !");
    thread.setDaemon(true);
    thread.start();

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertTrue(
        "As the JackHammer is not granted(night), the worker resolution should fails -> thread should be waiting",
        thread.isAlive());

  }
View Full Code Here

Examples of fr.imag.adele.apam.pax.test.grant.impl.ToolManager

      System.out.println("Contains : " + inst.getName());
    }
    System.out.println();

    Assert.assertNotNull("DayState is not found in the composite", dayinst);
    ToolManager manager = (ToolManager) managerinst.getServiceObject();
    DayState state = (DayState) dayinst.getServiceObject();

    ThreadWrapper_grant thread = new ThreadWrapper_grant(worker1);

    System.out.println(">Init : night !");
    thread.setDaemon(true);
    thread.start();

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertTrue(
        "As the JackHammer is not granted(night), the worker resolution should fails -> thread should be waiting",
        thread.isAlive());

    System.out.println(">9h : morning !");
    state.setHour(9);

    apam.waitForIt(1000);
    manager.printTools();
    Assert.assertTrue(
        "The JackHammer is granted (morning) but the worker resolution should fail too (because wrong implementation working)  -> thread should be waiting",
        thread.isAlive());
  }
View Full Code Here

Examples of fr.imag.adele.apam.pax.test.grant.impl.ToolManager

      System.out.println("Contains : " + inst.getName());
    }
    System.out.println();

    Assert.assertNotNull("DayState is not found in the composite", dayinst);
    ToolManager manager = (ToolManager) managerinst.getServiceObject();
    DayState state = (DayState) dayinst.getServiceObject();
    manager.printTools();
    apam.waitForIt(500);
    ThreadWrapper_grant thread = new ThreadWrapper_grant(worker1);

    System.out.println(">19h : afternoon !");

    state.setHour(19);
    thread = new ThreadWrapper_grant(worker1);
    thread.setDaemon(true);
    thread.start();

    apam.waitForIt(500);
    Assert.assertFalse(
        "As the JackHammer is granted (afternoon), the worker resolution should be ok -> thread should be ended",
        thread.isAlive());

    System.out.println(">23h : night !");
    state.setHour(23);
    manager.printTools();
    apam.waitForIt(500);
    thread = new ThreadWrapper_grant(worker1);
    thread.setDaemon(true);
    thread.start();
View Full Code Here

Examples of org.andrewberman.ui.tools.ToolManager

  protected ToolManager toolManager;

  public ToolDock(PApplet app)
  {
    super(app);
    toolManager = new ToolManager(this);
    EventManager.instance.setToolManager(toolManager);
  }
View Full Code Here

Examples of org.apache.velocity.tools.ToolManager

    private static final String TOOLBOX_PATH = "@test.conf.dir@/whiteboxtest-toolbox.xml";

    private static ToolContext toolbox = null;

    public static @BeforeClass void initGenericToolsTests() throws Exception {
        ToolManager manager = new ToolManager(false);
        manager.configure(TOOLBOX_PATH);
        toolbox = manager.createContext();
    }
View Full Code Here

Examples of org.apache.velocity.tools.ToolManager

    private static final String TOOLBOX_PATH = "@test.conf.dir@/whiteboxtest-toolbox.xml";

    private static ToolContext toolbox = null;

    public static @BeforeClass void initGenericToolsTests() throws Exception {
        ToolManager manager = new ToolManager(false);
        manager.configure(TOOLBOX_PATH);
        toolbox = manager.createContext();
    }
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.