|
@ -6,88 +6,106 @@ import org.junit.Test; |
|
|
|
|
|
|
|
|
public class SnakeGameTest { |
|
|
public class SnakeGameTest { |
|
|
SnakeGame snek = new SnakeGame(); |
|
|
SnakeGame snek = new SnakeGame(); |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
public void test() { |
|
|
public void test() { |
|
|
assertTrue(true); |
|
|
assertTrue(true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void hoeheTest() { |
|
|
public void hoeheTest() { |
|
|
assertTrue(snek.hoehe == 600); |
|
|
assertTrue(snek.hoehe == 600); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void breiteTest() { |
|
|
public void breiteTest() { |
|
|
assertTrue(snek.breite == 1200); |
|
|
assertTrue(snek.breite == 1200); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void titelTest() { |
|
|
public void titelTest() { |
|
|
assertTrue(snek.titel == "Snake"); |
|
|
assertTrue(snek.titel == "Snake"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void hoehePanelTest() { |
|
|
public void hoehePanelTest() { |
|
|
int hoehe = 100; |
|
|
int hoehe = 100; |
|
|
assertTrue(snek.getHoeheP1() == hoehe ); |
|
|
assertTrue(snek.getHoeheP1() == hoehe ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void breitePanelTest() { |
|
|
public void breitePanelTest() { |
|
|
int breite = 100; |
|
|
int breite = 100; |
|
|
assertTrue(snek.getBreiteP1() == breite ); |
|
|
assertTrue(snek.getBreiteP1() == breite ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void hoehePane2Test() { |
|
|
public void hoehePane2Test() { |
|
|
int hoehe = 100; |
|
|
int hoehe = 100; |
|
|
assertTrue(snek.getHoeheP2() == hoehe ); |
|
|
assertTrue(snek.getHoeheP2() == hoehe ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void breitePane2Test() { |
|
|
public void breitePane2Test() { |
|
|
int breite = 100; |
|
|
int breite = 100; |
|
|
assertTrue(snek.getBreiteP2() == breite ); |
|
|
assertTrue(snek.getBreiteP2() == breite ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void hoehePane3Test() { |
|
|
public void hoehePane3Test() { |
|
|
int hoehe = 100; |
|
|
int hoehe = 100; |
|
|
assertTrue(snek.getHoeheP3() == hoehe ); |
|
|
assertTrue(snek.getHoeheP3() == hoehe ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void breitePane3Test() { |
|
|
public void breitePane3Test() { |
|
|
int breite = 100; |
|
|
int breite = 100; |
|
|
assertTrue(snek.getBreiteP3() == breite ); |
|
|
assertTrue(snek.getBreiteP3() == breite ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void hoehePane4Test() { |
|
|
public void hoehePane4Test() { |
|
|
int hoehe = 100; |
|
|
int hoehe = 100; |
|
|
assertTrue(snek.getHoeheP4() == hoehe ); |
|
|
assertTrue(snek.getHoeheP4() == hoehe ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void breitePane4Test() { |
|
|
public void breitePane4Test() { |
|
|
int breite = 100; |
|
|
int breite = 100; |
|
|
assertTrue(snek.getBreiteP4() == breite ); |
|
|
assertTrue(snek.getBreiteP4() == breite ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void xCords1Test() { |
|
|
public void xCords1Test() { |
|
|
int Cords = 300; |
|
|
int Cords = 300; |
|
|
assertTrue(snek.getxCords1() == Cords ); |
|
|
assertTrue(snek.getxCords1() == Cords ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void xCords2Test() { |
|
|
public void xCords2Test() { |
|
|
int Cords = 400; |
|
|
int Cords = 400; |
|
|
assertTrue(snek.getxCords2() == Cords ); |
|
|
assertTrue(snek.getxCords2() == Cords ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void xCords3Test() { |
|
|
public void xCords3Test() { |
|
|
int Cords = 500; |
|
|
int Cords = 500; |
|
|
assertTrue(snek.getxCords3() == Cords ); |
|
|
assertTrue(snek.getxCords3() == Cords ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void xCords4Test() { |
|
|
public void xCords4Test() { |
|
|
int Cords = 600; |
|
|
int Cords = 600; |
|
|
assertTrue(snek.getxCords4() == Cords ); |
|
|
assertTrue(snek.getxCords4() == Cords ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void xCords5Test() { |
|
|
public void xCords5Test() { |
|
|
int Cords = 700; |
|
|
int Cords = 700; |
|
|
assertTrue(snek.getxCords5() == Cords ); |
|
|
assertTrue(snek.getxCords5() == Cords ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
public void xCords6Test() { |
|
|
public void xCords6Test() { |
|
|
int Cords = 800; |
|
|
int Cords = 800; |
|
|
assertTrue(snek.getxCords6() == Cords ); |
|
|
assertTrue(snek.getxCords6() == Cords ); |
|
|