modules/graphics/src/test/java/test/javafx/scene/Scene_properties_Test.java

Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:

@@ -21,29 +21,38 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
-package javafx.scene;
+package test.javafx.scene;
 
 import com.sun.javafx.cursor.CursorFrame;
 import com.sun.javafx.event.EventHandlerManager;
 import java.util.Arrays;
 import java.util.Collection;
 import javafx.event.Event;
 import javafx.event.EventHandler;
 import javafx.geometry.NodeOrientation;
+import javafx.scene.Cursor;
+import javafx.scene.Cursor;
+import javafx.scene.CursorShim;
+import javafx.scene.Group;
+import javafx.scene.Group;
+import javafx.scene.ParallelCamera;
+import javafx.scene.ParallelCamera;
+import javafx.scene.PerspectiveCamera;
+import javafx.scene.PerspectiveCamera;
 import javafx.scene.paint.Color;
 
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
-import com.sun.javafx.test.PropertiesTestBase;
-import com.sun.javafx.test.PropertiesTestBase.Configuration;
-import com.sun.javafx.test.objects.TestScene;
-import com.sun.javafx.test.objects.TestStage;
+import test.com.sun.javafx.test.PropertiesTestBase;
+import test.com.sun.javafx.test.PropertiesTestBase.Configuration;
+import test.com.sun.javafx.test.objects.TestScene;
+import test.com.sun.javafx.test.objects.TestStage;
 import javafx.scene.layout.Pane;
 
 @RunWith(Parameterized.class)
 public final class Scene_properties_Test extends PropertiesTestBase {
     @Parameters

@@ -71,15 +80,11 @@
 //            config(testScene, "height", , ),
             config(testScene, "camera", null, new ParallelCamera()),
             config(testScene, "fill", Color.WHITE, Color.BLACK),
             config(testScene, "fill", null, Color.TRANSPARENT),
             config(testScene, "root", new Group(), new Pane()),
-            config(testScene, "cursor", null, new Cursor("TestCursor") {
-                @Override public CursorFrame getCurrentFrame() {
-                    throw new UnsupportedOperationException("Not supported yet.");
-                }
-            }),
+            config(testScene, "cursor", null, CursorShim.getCursor("TestCursor")),
             config(testScene, "cursor", Cursor.DEFAULT, Cursor.CROSSHAIR),
             config(testScene, "eventDispatcher",
                    null,
                    new EventHandlerManager(null)),
             config(testScene, "camera", null, new PerspectiveCamera()),