aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/HighDpiAwareApplicationTest.java
diff options
context:
space:
mode:
authorMartin <martin.weick@outlook.com>2018-05-04 15:30:58 +0200
committerTharre <tharre3@gmail.com>2018-05-04 20:37:04 +0200
commitc92959c3fe2d82be997d54581139c8c9ee7e946b (patch)
tree2aea6d5af7961b44f12d8d671efaee5408d545fb /src/test/java/at/ac/tuwien/sepm/assignment/groupphase/HighDpiAwareApplicationTest.java
parenta62919d43debaa0c6baf32de9658740dc929cba6 (diff)
downloadsepm-groupproject-c92959c3fe2d82be997d54581139c8c9ee7e946b.tar.gz
sepm-groupproject-c92959c3fe2d82be997d54581139c8c9ee7e946b.tar.xz
sepm-groupproject-c92959c3fe2d82be997d54581139c8c9ee7e946b.zip
UI Tests
Diffstat (limited to 'src/test/java/at/ac/tuwien/sepm/assignment/groupphase/HighDpiAwareApplicationTest.java')
-rw-r--r--src/test/java/at/ac/tuwien/sepm/assignment/groupphase/HighDpiAwareApplicationTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/HighDpiAwareApplicationTest.java b/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/HighDpiAwareApplicationTest.java
new file mode 100644
index 0000000..b9b0605
--- /dev/null
+++ b/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/HighDpiAwareApplicationTest.java
@@ -0,0 +1,24 @@
+package at.ac.tuwien.sepm.assignment.groupphase;
+
+
+import javafx.geometry.Bounds;
+import javafx.scene.Node;
+import org.testfx.api.FxRobotContext;
+import org.testfx.framework.junit.ApplicationTest;
+import org.testfx.service.locator.impl.BoundsLocatorImpl;
+import org.testfx.service.locator.impl.PointLocatorImpl;
+
+public class HighDpiAwareApplicationTest extends ApplicationTest {
+ public HighDpiAwareApplicationTest() {
+ FxRobotContext context = robotContext();
+ context.setBoundsLocator(
+ new BoundsLocatorImpl() {
+ @Override
+ public Bounds boundsOnScreenFor(Node node) {
+ Bounds bounds = super.boundsOnScreenFor(node);
+ return ScaledBounds.wrap(bounds);
+ }
+ });
+ robotContext().setPointLocator(new PointLocatorImpl(context.getBoundsLocator()));
+ }
+}