|
|
@ -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); |
|
|
|
} |
|
|
|
|
|
|
|