package de.gurkenlabs.litiengine.entities;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class CreatureTests {

  private IMobileEntity mobileEntity;

  @BeforeEach
  public void setUp(){
    // arrange
    mobileEntity = new TestMobileEntity();
  }

  @Test
  public void testInitializationByAnnotation_velocity(){
    // act
    int actualVelocity = mobileEntity.getVelocity().get().intValue();

    // assert
    assertEquals(111, actualVelocity);
  }

  @Test
  public void testInitializationByAnnotation_acceleration(){
    // act
    int actualAcceleration = mobileEntity.getAcceleration();

    // assert
    assertEquals(222, actualAcceleration);
  }

  @Test
  public void testInitializationByAnnotation_deceleration(){
    // act
    int actualDeceleration = mobileEntity.getDeceleration();

    // assert
    assertEquals(333, actualDeceleration);
  }

  @Test
  public void testInitializationByAnnotation_turnOnMove(){
    // act
    boolean canTurnOnMove = mobileEntity.turnOnMove();

    // assert
    assertFalse(canTurnOnMove);
  }

  @MovementInfo(velocity = 111, acceleration = 222, deceleration = 333, turnOnMove = false)
  private class TestMobileEntity extends Creature {

  }
}

@@ -280,34 +280,25 @@
 ate 
-IMobileEntity mobileEntity
+Creature creature
 ;%0A%0A 
@@ -341,58 +341,35 @@
     
-// arrange%0A    mobileEntity = new TestMobileEntity
+creature = new TestCreature
 ();%0A
@@ -474,28 +474,24 @@
 ocity = 
-mobileEntity
+creature
 .getVelo
@@ -679,36 +679,32 @@
 eleration = 
-mobileEntity
+creature
 .getAccelera
@@ -883,28 +883,24 @@
 ation = 
-mobileEntity
+creature
 .getDece
@@ -1084,20 +1084,16 @@
 e = 
-mobileEntity
+creature
 .tur
@@ -1271,20 +1271,16 @@
 Test
-MobileEntity
+Creature
  ext
@@ -1295,15 +1295,14 @@
 ature %7B%0A
-%0A
   %7D%0A%7D%0A

rename for clarification