modules/graphics/src/test/java/test/javafx/scene/Node_lookup_Test.java
Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:
@@ -21,17 +21,20 @@
* 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 static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import java.util.Set;
+import javafx.scene.Group;
+import javafx.scene.Node;
+import javafx.scene.ParentShim;
import org.junit.Before;
import org.junit.Test;
public class Node_lookup_Test {
@@ -53,13 +56,13 @@
e.setId("e");
bc = new Group();
bc.getStyleClass().addAll("b", "c");
d2 = new Group();
d2.getStyleClass().add("d");
- root.getChildren().addAll(a, bc);
- a.getChildren().addAll(d, e);
- bc.getChildren().addAll(d2);
+ ParentShim.getChildren(root).addAll(a, bc);
+ ParentShim.getChildren(a).addAll(d, e);
+ ParentShim.getChildren(bc).addAll(d2);
}
@Test public void quickTest() {
Node found = root.lookup("Group");
assertSame(root, found);