@ -121,10 +121,15 @@ public class MouseGame extends JFrame {
}//end standardkonstruktor
public int getResetX() {
return resetX;
}
private void reset(JPanel panel) {
panel.addMouseListener(new MouseAdapter() {
@Override
@ -38,4 +38,13 @@ public class MouseGameTest {
assertTrue(mg.getTitle()=="Mouse Game");
@Test
public void resetXPruefen() throws AWTException {
//Given
MouseGame mg = new MouseGame();
//Then
assertTrue(mg.getResetX()==200);