Exemple #1
0
  // ex15 test
  @Test
  public void testChangeSpeed() {
    // setup
    Vehicle vehicle = new Vehicle();
    vehicle.setAngle(0);
    vehicle.setOwner("hoge");
    vehicle.setSpeed(60);

    // execute
    vehicle.changeSpeed(12.34);
    double actual = vehicle.getSpeed();

    // test
    assertEquals(12.34, actual, 0.01);
  }