Package rinde.sim.core.model.pdp.PDPModelTest

Examples of rinde.sim.core.model.pdp.PDPModelTest.TestVehicle.tick()


    rm.register(pack1);
    rm.register(truck);
    rm.addObjectAt(pack1, new Point(1, 1));

    // nothing should happen
    truck.tick(TimeLapseFactory.create(0, 10000));

    assertEquals(0, model.getContentsSize(truck), EPSILON);
    assertTrue(model.getContents(truck).isEmpty());
    assertEquals(ParcelState.AVAILABLE, model.getParcelState(pack1));
    assertEquals(VehicleState.IDLE, model.getVehicleState(truck));
View Full Code Here


    model.pickup(truck, pack1, TimeLapseFactory.create(0, 1));
    assertTrue(model.getContents(truck).isEmpty());
    assertEquals(model.getContentsSize(truck), 0, EPSILON);

    truck.tick(TimeLapseFactory.create(1, 10));
    assertFalse(model.getContents(truck).isEmpty());
    assertTrue(model.getContents(truck).contains(pack1));
    assertEquals(model.getContentsSize(truck), 2, EPSILON);
  }
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.