modules/graphics/src/test/java/test/com/sun/javafx/sg/prism/NGRectangleTest.java
Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:
@@ -21,13 +21,15 @@
* 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 com.sun.javafx.sg.prism;
+package test.com.sun.javafx.sg.prism;
import com.sun.javafx.geom.RectBounds;
+import com.sun.javafx.sg.prism.NGNodeShim;
+import com.sun.javafx.sg.prism.NGRectangle;
import com.sun.prism.paint.Color;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -49,11 +51,11 @@
/**
* NGRectangle supports opaque regions
*/
@Test
public void testSupportsOpaqueRegions() {
- assertTrue(r.supportsOpaqueRegions());
+ assertTrue(NGNodeShim.supportsOpaqueRegions(r));
}
/**
* The default rectangle with a fill and size should have an opaque region
*/
@@ -109,11 +111,11 @@
class NGRectangleMock extends NGRectangle {
boolean opaqueRegionRecomputed = false;
@Override
- protected boolean hasOpaqueRegion() {
+ public boolean hasOpaqueRegion() {
opaqueRegionRecomputed = true;
return super.hasOpaqueRegion();
}
@Override