Examples of WaitResultTest


Examples of org.mitre.sim.test.WaitResultTest

  }

   @SuppressWarnings("deprecation")
  public void agenda() {
     if (!entity.entityIsAlive(null))
       fifo.add(new WaitResultTest(entity.getTimeNow(), "Entity null is dead", entity));
     if (entity.entityIsAlive(e1.getEntity()))
       fifo.add(new WaitResultTest(entity.getTimeNow(), "EntityOne alive", entity));
     entity.testWaitForTime(3.0);
     if (!entity.entityIsAlive(e1.getEntity()))
       fifo.add(new WaitResultTest(entity.getTimeNow(), "EntityOne not alive", entity));
     try {
      e1.actionMethod();
      fifo.add(new WaitResultTest(entity.getTimeNow(), "Failure: exception not thrown", entity));
     } catch (IllegalStateException e) {
       fifo.add(new WaitResultTest(entity.getTimeNow(), "Success: exception thrown", entity));
     }
   }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    public void initialize() {
      register(new TestEntity(), entityName);
    }

    public void simulationComplete() {
      fifo.add(new WaitResultTest(0.0, "simulation complete", null));
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

    public void setEntity(Entity entity) {
      this.entity = entity;
    }

    public void eventOne() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "In eventOne", entity));
      entity.schedule("eventTwo", 3.0);
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

      fifo.add(new WaitResultTest(entity.getTimeNow(), "In eventOne", entity));
      entity.schedule("eventTwo", 3.0);
    }

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

Examples of org.mitre.sim.test.WaitResultTest

      fifo.add(new WaitResultTest(entity.getTimeNow(), "In eventTwo", entity));
    }

    @SuppressWarnings("deprecation")
    public void agenda() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), "Agenda begun", entity));
      entity.schedule("eventOne", 2.0);
      fifo.add(new WaitResultTest(entity.getTimeNow(), "After schedule", entity));
      entity.testWaitForTime(3.0);
      fifo.add(new WaitResultTest(entity.getTimeNow(), "After waitForTime", entity));
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

      entity.testWaitForTime(3.0);
      fifo.add(new WaitResultTest(entity.getTimeNow(), "After waitForTime", entity));
    }

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

Examples of org.mitre.sim.test.WaitResultTest

    public void setEntity(Entity entity) {
      this.entity = entity;
    }
   
    public void agenda() {
      fifo.add(new WaitResultTest(entity.getTimeNow(), entity.getName(), entity));
      String finalTimeCorrect = (entity.getTimeLast() == finalTime) ?
          "good" : "bad";
      fifo.add(new WaitResultTest(entity.getTimeNow(), finalTimeCorrect, entity));
      throw new RuntimeException(exceptionMessage);
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

      fifo.add(new WaitResultTest(entity.getTimeNow(), finalTimeCorrect, entity));
      throw new RuntimeException(exceptionMessage);
    }

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

Examples of org.mitre.sim.test.WaitResultTest

      ProcessDelegate e2 = new EntityWithAgenda();
//      fifo.add(new WaitResultTest(0.0, e1.hasAgenda() ? "yes" : "no", null));
//      fifo.add(new WaitResultTest(0.0, e2.hasAgenda() ? "yes" : "no", null));
//      register(e1);
//      register(e2);
      fifo.add(new WaitResultTest(0.0, register(e1).hasAgenda() ? "yes" : "no", null));
      fifo.add(new WaitResultTest(0.0, register(e2).hasAgenda() ? "yes" : "no", null));
    }
View Full Code Here

Examples of org.mitre.sim.test.WaitResultTest

      pe1.addSimEventListener(listener);
      pe2.addSimEventListener(listener);
    }

    public void simulationComplete() {
      fifo.add(new WaitResultTest(10.0, "simulation complete", null));
    }
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.