real crappy tests implemented for all of the controllers
This commit is contained in:
parent
367e4f7ef2
commit
72346ee6e6
25
src/test/kotlin/controllers/RobotAutomatonTest.kt
Normal file
25
src/test/kotlin/controllers/RobotAutomatonTest.kt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package controllers
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Assertions.assertEquals
|
||||||
|
import org.junit.jupiter.api.Test
|
||||||
|
import java.awt.Point
|
||||||
|
|
||||||
|
internal class RobotAutomatonTest {
|
||||||
|
|
||||||
|
private val robot = RobotAutomaton()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests that [RobotAutomaton.moveMouse] moves the mouse pointer to the
|
||||||
|
* provided [Point] coordinates.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
fun `moveMouse moves to given coordinates`() {
|
||||||
|
val point = Point(100, 200)
|
||||||
|
|
||||||
|
robot.moveMouse(point)
|
||||||
|
|
||||||
|
val current = robot.getPointerLocation()
|
||||||
|
assertEquals(point, current)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user