@@ -0,0 +1,1088 @@
+package nl.github.martijn9612.fishy;%0A%0Aimport static org.junit.Assert.*;%0Aimport static org.mockito.Mockito.mock;%0A%0Aimport org.junit.Test;%0Aimport org.newdawn.slick.GameContainer;%0A%0Apublic class LinearOpponentTest %7B%0A    private final GameContainer gc = mock(GameContainer.class);%0A%0A    /**%0A     * Test case for objectLogic method.%0A     * spawnsleft = true.%0A     */%0A    @Test%0A    public void testObjectLogic1() %7B%0A        Opponent opp = new LinearOpponent(true, 0, 0, 1, 1);%0A        float centerbefore = opp.ellipse.getCenterX();%0A        opp.objectLogic(gc, 0);%0A        assertEquals(opp.ellipse.getCenterX(), centerbefore + 1, 0.1);%0A        assertEquals(opp.getX(), 1, 0.1);%0A    %7D%0A%0A    %0A    /**%0A     * Test case for objectLogic method.%0A     * spawnsleft = false;%0A     */%0A    @Test%0A    public void testObjectLogic2() %7B%0A        Opponent opp = new LinearOpponent(false, 10, 10, 1, 1);%0A        float centerbefore = opp.ellipse.getCenterX();%0A        opp.objectLogic(gc, 0);%0A        assertEquals(opp.ellipse.getCenterX(), centerbefore - 1, 0.1);%0A        assertEquals(opp.getX(), 9.0, 0.1);%0A    %7D%0A   %0A%7D%0A

Test file for LinearOpponent.java <testing