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