コード例 #1
0
ファイル: TraCITest.java プロジェクト: p1tt1/TraCI4J
 /**
  * Tests that the vehicle's ID of the first vehicle is correct.
  *
  * @throws IOException
  */
 @Test
 public void testVehicleIDAtStepOne() throws IOException {
   conn.nextSimStep();
   final Repository<Vehicle> repo = conn.getVehicleRepository();
   assertThat(repo.getIDs(), equalTo(Collections.singleton("0.0")));
 }
コード例 #2
0
ファイル: TraCITest.java プロジェクト: p1tt1/TraCI4J
 /**
  * In this simulation, there should be exactly one vehicle at step one.
  *
  * @throws IOException
  */
 @Test
 public void testOneVehicleAtStepOne() throws IOException {
   conn.nextSimStep();
   final Repository<Vehicle> repo = conn.getVehicleRepository();
   assertThat(repo.getIDs().size(), equalTo(1));
 }