Beispiel #1
0
 @Test
 public void cannotAccelerateBeyondMaxSpeed() {
   Car car1 = new Car("Red", 100);
   car1.accelerate(101);
   assertThat(car1.getSpeed(), is(100));
 }
Beispiel #2
0
 @Test
 public void canAccelerate() {
   Car car1 = new Car("Red", 100);
   car1.accelerate(10);
   assertThat(car1.getSpeed(), is(10));
 }