예제 #1
0
 @Test
 public void cannotDecelerateBeyondMinSpeed() {
   Car car1 = new Car("Red", 100);
   car1.decelerate(-1);
   assertThat(car1.getSpeed(), is(0));
 }
예제 #2
0
 @Test
 public void canDecelerate() {
   Car car1 = new Car("Red", 100);
   car1.decelerate(10);
   assertThat(car1.getSpeed(), is(0));
 }