Package it.polito.appeal.traci

Examples of it.polito.appeal.traci.VehicleLifecycleObserver


 
  @Test
  public void testGetSubscriptionResponses() throws IOException {
    final List<Vehicle> departed = new ArrayList<Vehicle>();
   
    conn.addVehicleLifecycleObserver(new VehicleLifecycleObserver() {
      @Override
      public void vehicleArrived(Vehicle v) { }
     
      @Override
      public void vehicleDeparted(Vehicle v) {
View Full Code Here


//  @Ignore // its duration may be annoying; feel free to comment this
  public void testWhoDepartsArrives() throws IOException {
   
    final Set<Vehicle> traveling = new HashSet<Vehicle>();
   
    conn.addVehicleLifecycleObserver(new VehicleLifecycleObserver() {
     
      @Override
      public void vehicleArrived(Vehicle v) {
        assertTrue(traveling.contains(v));
        traveling.remove(v);
View Full Code Here

  }
 
  @Test
  public void testUsingInactiveVehicle() throws IOException {
    getFirstVehicle();
    conn.addVehicleLifecycleObserver(new VehicleLifecycleObserver() {
      @Override
      public void vehicleTeleportStarting(Vehicle vehicle) {}
      @Override
      public void vehicleTeleportEnding(Vehicle vehicle) { }
      @Override
View Full Code Here

   */
  @Test
  public void testGetSubscriptionResponses() throws IOException {
    final List<Vehicle> departed = new ArrayList<Vehicle>();
   
    conn.addVehicleLifecycleObserver(new VehicleLifecycleObserver() {
      @Override
      public void vehicleArrived(Vehicle v) { }
     
      @Override
      public void vehicleDeparted(Vehicle v) {
View Full Code Here

//  @Ignore // its duration may be annoying; feel free to comment this
  public void testWhoDepartsArrives() throws IOException {
   
    final Set<Vehicle> traveling = new HashSet<Vehicle>();
   
    conn.addVehicleLifecycleObserver(new VehicleLifecycleObserver() {
     
      @Override
      public void vehicleArrived(Vehicle v) {
        assertTrue(traveling.contains(v));
        traveling.remove(v);
View Full Code Here

   * @throws IOException
   */
  @Test
  public void testUsingInactiveVehicle() throws IOException {
    getFirstVehicle();
    conn.addVehicleLifecycleObserver(new VehicleLifecycleObserver() {
      @Override
      public void vehicleTeleportStarting(Vehicle vehicle) {}
      @Override
      public void vehicleTeleportEnding(Vehicle vehicle) { }
      @Override
View Full Code Here

TOP

Related Classes of it.polito.appeal.traci.VehicleLifecycleObserver

Copyright © 2018 www.massapicom. 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.