Package it.polito.appeal.traci

Examples of it.polito.appeal.traci.ChangeLightsStateQuery


                    LightState[] ls = new LightState[tl.getReadCurrentStateQuery().get().lightStates.length];
                    for(int i=0; i<tl.getReadCurrentStateQuery().get().lightStates.length; i++){
                     ls[i]=LightState.RED;
                    }
                    TLState tls = new TLState(ls);
                    ChangeLightsStateQuery q = tl.getChangeLightsStateQuery();
                    q.setValue(tls);
                    q.run();
                   

                }
            } catch (IOException ex) {
                Logger.getLogger(FuzzyTesterView.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here


  private static final TLState TEST_TL_STATE = new TLState("rrGGyyyyggrryryr");

  @Test
  public void testChangeState() throws IOException {
    TrafficLight tl = repo.getByID("0");
    ChangeLightsStateQuery q = tl.getChangeLightsStateQuery();
    q.setValue(TEST_TL_STATE);
    q.run();
   
    assertEquals(TEST_TL_STATE, tl.getReadCurrentStateQuery().get());
  }
View Full Code Here

  private static final TLState TEST_TL_STATE = new TLState("rrGGyyyyggrryryr");

  @Test
  public void testChangeState() throws IOException {
    TrafficLight tl = repo.getByID("0");
    ChangeLightsStateQuery q = tl.queryChangeLightsState();
    q.setValue(TEST_TL_STATE);
    q.run();
   
    assertEquals(TEST_TL_STATE, tl.queryReadState().get());
  }
View Full Code Here

TOP

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

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.