Пример #1
0
 @Test
 public void canCreateSnakeWithHealthAndName() {
   Alien snake = new Snake(0, "");
   snake.setName("Snakey");
   snake.setHealth(70);
   assertEquals("Snake Name is", "Snakey", snake.getName());
   assertEquals("Snake health is", 70, snake.getHealth());
 }
Пример #2
0
 @Test
 public void canGetDamageDoneBySnake() {
   Alien snake = new Snake(95, "Snakey");
   assertEquals("Damage done", 10, snake.getDamage());
 }