Browse Source

[MouseGameTest Class]: Test: "mouseResetTest" hinzugefügt.

remotes/origin/MouseGame
fdai7382 2 years ago
parent
commit
c57265d7bb
  1. 20
      JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java

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

@ -2,12 +2,30 @@ package de.hs_fulda.gruppenprojekt.JavaGamelauncher;
import static org.junit.Assert.*;
import java.awt.AWTException;
import java.awt.MouseInfo;
import java.awt.Point;
import java.awt.PointerInfo;
import org.junit.Test;
public class MouseGameTest {
@Test
public void test() {
public void mouseResetTest() throws AWTException {
//Given
MouseGame mg = new MouseGame();
//When
mg.robot.mouseMove(200, 170);
PointerInfo info = MouseInfo.getPointerInfo();
Point location = info.getLocation();
if(location.x==200 && location.y==170) {
assertTrue(true);
}
//Then
assertTrue(true);
}

Loading…
Cancel
Save