Browse Source

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

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

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

@ -121,10 +121,15 @@ public class MouseGame extends JFrame {
}//end standardkonstruktor }//end standardkonstruktor
public int getResetX() {
return resetX;
}
private void reset(JPanel panel) { private void reset(JPanel panel) {
panel.addMouseListener(new MouseAdapter() { panel.addMouseListener(new MouseAdapter() {
@Override @Override

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

@ -38,4 +38,13 @@ public class MouseGameTest {
assertTrue(mg.getTitle()=="Mouse Game"); assertTrue(mg.getTitle()=="Mouse Game");
} }
@Test
public void resetXPruefen() throws AWTException {
//Given
MouseGame mg = new MouseGame();
//Then
assertTrue(mg.getResetX()==200);
}
} }
Loading…
Cancel
Save