Browse Source

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

remotes/origin/MouseGame
fdai7382 2 years ago
parent
commit
600ba3cb74
  1. 4
      JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java
  2. 9
      JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java

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

@ -130,6 +130,10 @@ public class MouseGame extends JFrame {
}
public int getResetY() {
return resetY;
}
private void reset(JPanel panel) {
panel.addMouseListener(new MouseAdapter() {

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

@ -47,4 +47,13 @@ public class MouseGameTest {
assertTrue(mg.getResetX()==200);
}
@Test
public void resetYPruefen() throws AWTException {
//Given
MouseGame mg = new MouseGame();
//Then
assertTrue(mg.getResetY()==170);
}
}
Loading…
Cancel
Save