Examples of WaitResultTest


Examples of org.mitre.sim.test.WaitResultTest

    public void eventSimple() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "eventSimple", entity));
    }

    public void eventBad() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "eventBad", entity));
      @SuppressWarnings("unused")
      int i = 1 / 0;
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

      @SuppressWarnings("unused")
      int i = 1 / 0;
    }

    public void exceptionHandler(Exception e) {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "exceptionHandler", entity));
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    public void exceptionHandler(Exception e) {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "exceptionHandler", entity));
    }

    public void agenda() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "Agenda begun", entity));
      try {
        entity.schedule("eventThatDoesNotExist", 2.0);
      }
      catch (IllegalArgumentException e) {
        fifo.add(new WaitResultTest(entity.getTimeNow(), "not there", entity));
      }
      try {
        entity.schedule("eventIsHere", 2.0);
      }
      catch (IllegalArgumentException e) {
        fifo.add(new WaitResultTest(entity.getTimeNow(), "wrong signature 1", entity));
      }
      try {
        entity.schedule("eventIsHere", 2.0, 6.0);
      }
      catch (IllegalArgumentException e) {
        fifo.add(new WaitResultTest(entity.getTimeNow(), "wrong signature 2", entity));
      }
      try {
        entity.schedule("eventSimple", -1.0);
      }
      catch (IllegalArgumentException e) {
        fifo.add(new WaitResultTest(entity.getTimeNow(), "negative delay", entity));
      }
      entity.schedule("eventIsHere", 2.0, "A String");
      fifo.add(new WaitResultTest(entity.getTimeNow(), "right signature", entity));
      entity.schedule("eventSimple", 2.0);
      fifo.add(new WaitResultTest(entity.getTimeNow(), "simple signature", entity));
      try {
        entity.schedule("agenda", 2.0);
      }
      catch (IllegalArgumentException e) {
        fifo.add(new WaitResultTest(entity.getTimeNow(), "agenda", entity));
      }
      entity.schedule("eventBad", 1.0);
      fifo.add(new WaitResultTest(entity.getTimeNow(), "Agenda end", entity));
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    @SuppressWarnings("deprecation")
    public void agenda() {
      try {
        e1.getEntity().testWaitForAction(2.0, WaitReturns.TIME);
        fifo.add(new WaitResultTest(0.0, "Bad waitForAction Entity", null));
      }
      catch (IllegalStateException e) {
        fifo.add(new WaitResultTest(0.0, "waitForAction Entity", null));
      }
      try {
        e1.getEntity().testWaitForTime(2.0);
        fifo.add(new WaitResultTest(0.0, "Bad waitForTime Entity", null));
      }
      catch (IllegalStateException e) {
        fifo.add(new WaitResultTest(0.0, "waitForTime Entity", null));
      }
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

      register(e1, "EntityOne");
      EntityTwo e2 = new EntityTwo(e1);
      register(e2, "EntityTwo");
      try {
        e2.getEntity().testWaitForAction(2.0, WaitReturns.TIME);
        fifo.add(new WaitResultTest(0.0,
                                    "Bad waitForAction Simulation", null));
      }
      catch (IllegalStateException e) {
        fifo.add(new WaitResultTest(0.0, "waitForAction Simulation", null));
      }
      try {
        e2.getEntity().testWaitForTime(2.0);
        fifo.add(new WaitResultTest(0.0, "Bad waitForTime Simulation", null));
      }
      catch (IllegalStateException e) {
        fifo.add(new WaitResultTest(0.0, "waitForTime Simulation", null));
      }
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    }
   
    @SuppressWarnings("deprecation")
    public void agenda() {
      entity.testWaitForTime(5.0);
      fifo.add(new WaitResultTest(entity.getTimeNow(), "registering", entity));
      entity.register(new LateEntity());
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    public void setEntity(Entity entity) {
      this.entity = entity;
    }
   
    public void initialize() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "initialize", entity));
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    public void initialize() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "initialize", entity));
    }

    public void agenda() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "agenda", entity));
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    public void agenda() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "agenda", entity));
    }

    public void entityComplete() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "entityComplete", entity));
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    }

    @SuppressWarnings("deprecation")
    public void agenda() {
      entity.testWaitForAction(2.0, WaitReturns.TIME);
      fifo.add(new WaitResultTest(entity.getTimeNow(), "EntityOne done", entity));
    }
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.