Browse Source

[MouseGameTest Class]: Test: "boundsHoehePruefen" erstellt.

remotes/origin/MouseGame
fdai7382 2 years ago
parent
commit
34bee5e69c
  1. 5
      JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java
  2. 8
      JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java

5
JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java

@ -141,6 +141,11 @@ public class MouseGame extends JFrame {
} }
public int getHoehe() {
return hoehe;
}
private void reset(JPanel panel) { private void reset(JPanel panel) {
panel.addMouseListener(new MouseAdapter() { panel.addMouseListener(new MouseAdapter() {
@Override @Override

8
JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java

@ -56,4 +56,12 @@ public class MouseGameTest {
assertTrue(mg.getResetY()==170); assertTrue(mg.getResetY()==170);
} }
@Test
public void boundsHoehePruefen() throws AWTException {
//Given
MouseGame mg = new MouseGame();
//Then
assertTrue(mg.getHoehe()==650);
}
} }
Loading…
Cancel
Save