@@ -0,0 +1,2548 @@
+package ge.edu.freeuni.sdp.arkanoid.model;%0A%0Aimport ge.edu.freeuni.sdp.arkanoid.model.geometry.Point;%0Aimport ge.edu.freeuni.sdp.arkanoid.model.geometry.Rectangle;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.MockitoAnnotations;%0Aimport org.mockito.Mock;%0A%0Aimport java.util.ArrayList;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotEquals;%0Aimport static org.mockito.Mockito.*;%0A%0A/**%0A * Created by Babdus on 5/4/16.%0A */%0Apublic class WormholeBallTest %7B%0A%0A    @Mock ArrayList%3CPortalBrick%3E portalBricks;%0A    @Mock Capsule capsule;%0A    @Mock Point point;%0A%0A    @Before%0A    public void setup() %7B%0A        MockitoAnnotations.initMocks(this);%0A    %7D%0A%0A    @Test%0A    public void kind_is_ball() %7B%0A        WormholeBall target = new WormholeBall(portalBricks);%0A        GobjKind kind = target.getKind();%0A        assertEquals(GobjKind.Ball, kind);%0A    %7D%0A%0A    @Test%0A    public void ball_teleports_to_other_portalbrick() %7B%0A        Point point1 = new Point(0, 0);%0A        Point point2 = new Point(10, 10);%0A        PortalBrick pBrick1 = new PortalBrick(point1, BrickColor.Blue, capsule);%0A        PortalBrick pBrick2 = new PortalBrick(point2, BrickColor.Blue, capsule);%0A        ArrayList%3CPortalBrick%3E pBricks = new ArrayList%3CPortalBrick%3E();%0A        pBricks.add(pBrick1);%0A        pBricks.add(pBrick2);%0A        WormholeBall target = new WormholeBall(pBricks);%0A        target.interact(pBrick1);%0A        assertEquals(point2, target.getPosition());%0A    %7D%0A%0A    @Test%0A    public void is_portlBricks_alive_after_interact() %7B%0A        PortalBrick pBrick1 = new PortalBrick(point, BrickColor.Blue, capsule);%0A        PortalBrick pBrick2 = new PortalBrick(point, BrickColor.Blue, capsule);%0A        ArrayList%3CPortalBrick%3E pBricks = new ArrayList%3CPortalBrick%3E();%0A        pBricks.add(pBrick1);%0A        pBricks.add(pBrick2);%0A        WormholeBall target = new WormholeBall(pBricks);%0A        target.interact(pBrick1);%0A        assertEquals(pBrick1.isAlive(), true);%0A        assertEquals(pBrick2.isAlive(), true);%0A    %7D%0A%0A    @Test%0A    public void is_interact_called_on_other_portalBrick() %7B%0A        PortalBrick pBrick1 = mock(PortalBrick.class);%0A        PortalBrick pBrick2 = mock(PortalBrick.class);%0A        when(pBrick2.getPosition()).thenReturn(point);%0A        ArrayList%3CPortalBrick%3E pBricks = new ArrayList%3CPortalBrick%3E();%0A        pBricks.add(pBrick1);%0A        pBricks.add(pBrick2);%0A        WormholeBall target = new WormholeBall(pBricks);%0A        target.interact(pBrick1);%0A        verify(pBrick2, never()).interact(target);%0A    %7D%0A%7D%0A

Create WormholeBall tests