Exemple #1
0
 @Test
 public void testConstructorWithhNegative1BikeShouldReturn5AndTheBike() throws Exception {
   LightCycle bike = new LightCycle();
   Turbo turbo = new Turbo(6, bike);
   assertEquals(bike, turbo.getOwnerTest());
   assertEquals(6, turbo.getAmountTest());
 }
Exemple #2
0
 @Test
 public void testConsumeWith0TurboShouldReturn0ForY() throws Exception {
   LightCycle bike = new LightCycle();
   bike.setVelocityX(1);
   bike.setVelocityY(0);
   Turbo turbo = new Turbo(0, bike);
   turbo.consume();
   assertEquals(0, turbo.getAmountTest());
   assertEquals(0, turbo.getOwnerTest().getVelocityY());
 }
Exemple #3
0
 @Test
 public void testConstructorWith2NullShouldReturn2AndNull() throws Exception {
   Turbo turbo = new Turbo(2, null);
   assertEquals(2, turbo.getAmountTest());
   assertEquals(null, turbo.getOwnerTest());
 }