@@ -0,0 +1,1271 @@
+package ch.booyakasha.engine;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Apublic class EnemyEntityTest %7B%0A%09%0A%09private EnemyEntity enemy;%0A%0A%09@Before%0A%09public void setUp() throws Exception %7B%0A%09%09Configuration.setCurrent(new Configuration());%0A%09%09Game game = new Game();%0A%09%09enemy = new EnemyEntity(game, %22/sprites/enemy.gif%22, 300, 250);%0A%09%7D%0A%0A%09@Test%0A%09public void testMove() %7B%0A%09%09enemy.setHorizontalMovement(50);%0A%09%09enemy.move(500);%0A%09%09assertEquals(325, enemy.getX());%0A%09%7D%0A%0A%09@Test%0A%09public void testSetHorizontalMovement() %7B%0A%09%09enemy.setHorizontalMovement(100);%0A%09%09assertEquals(100, enemy.getHorizontalMovement(), 0);%0A%09%7D%0A%0A%09@Test%0A%09public void testSetVerticalMovement() %7B%0A%09%09enemy.setVerticalMovement(100);%0A%09%09assertEquals(100, enemy.getVerticalMovement(), 0);%0A%09%7D%0A%0A%09@Test%0A%09public void testGetHorizontalMovement() %7B%0A%09%09assertEquals(-100, enemy.getHorizontalMovement(), 0);%0A%09%7D%0A%0A%09@Test%0A%09public void testGetVerticalMovement() %7B%0A%09%09assertEquals(0, enemy.getVerticalMovement(), 0);%0A%09%7D%0A%0A%09@Test%0A%09public void testGetX() %7B%0A%09%09assertEquals(300, enemy.getX());%0A%09%7D%0A%0A%09@Test%0A%09public void testGetY() %7B%0A%09%09assertEquals(250, enemy.getY());%0A%09%7D%0A%09%0A%09@Test%0A%09public void testDoLogic() %7B%0A%09%09assertEquals(-100, enemy.dx, 0);%0A%09%09enemy.doLogic();%0A%09%09assertEquals(100, enemy.dx, 0);%0A%09%09%0A%09%7D%0A%0A%7D%0A

add unit test