modules/graphics/src/test/java/javafx/scene/shape/CircleTest.java

Print this page
rev 6167 : RT-35330 [Monocle] Remove StubToolkit and replace it with headless glass implementation


   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.shape;
  27 

  28 import com.sun.javafx.sg.prism.NGCircle;
  29 import com.sun.javafx.sg.prism.NGNode;
  30 import com.sun.javafx.test.TestHelper;
  31 import javafx.geometry.Bounds;
  32 import javafx.scene.NodeTest;
  33 import javafx.scene.paint.Color;
  34 import javafx.scene.paint.Paint;
  35 import javafx.scene.transform.Rotate;
  36 import javafx.scene.transform.Scale;

  37 import org.junit.Test;
  38 
  39 import static com.sun.javafx.test.TestHelper.assertSimilar;
  40 import static org.junit.Assert.assertFalse;
  41 import static org.junit.Assert.assertNotNull;
  42 
  43 
  44 public class CircleTest {
  45 



  46     @Test public void testPropertyPropagation_visible() throws Exception {
  47         final Circle node = new StubCircle();
  48         NodeTest.testBooleanPropertyPropagation(node, "visible", false, true);
  49     }
  50 
  51     @Test public void testPropertyPropagation_centerX() throws Exception {
  52         final Circle node = new StubCircle();
  53         NodeTest.testDoublePropertyPropagation(node, "centerX", 100, 200);
  54     }
  55 
  56     @Test public void testPropertyPropagation_centerY() throws Exception {
  57         final Circle node = new StubCircle();
  58         NodeTest.testDoublePropertyPropagation(node, "centerY", 100, 200);
  59     }
  60 
  61     @Test public void testPropertyPropagation_radius() throws Exception {
  62         final Circle node = new StubCircle();
  63         NodeTest.testDoublePropertyPropagation(node, "radius", 100, 200);
  64     }
  65     




   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.shape;
  27 
  28 import com.sun.javafx.FXUnit;
  29 import com.sun.javafx.sg.prism.NGCircle;
  30 import com.sun.javafx.sg.prism.NGNode;
  31 import com.sun.javafx.test.TestHelper;
  32 import javafx.geometry.Bounds;
  33 import javafx.scene.NodeTest;
  34 import javafx.scene.paint.Color;
  35 import javafx.scene.paint.Paint;
  36 import javafx.scene.transform.Rotate;
  37 import javafx.scene.transform.Scale;
  38 import org.junit.Rule;
  39 import org.junit.Test;
  40 
  41 import static com.sun.javafx.test.TestHelper.assertSimilar;
  42 import static org.junit.Assert.assertFalse;
  43 import static org.junit.Assert.assertNotNull;
  44 
  45 
  46 public class CircleTest {
  47 
  48     @Rule
  49     public FXUnit fx = new FXUnit();
  50 
  51     @Test public void testPropertyPropagation_visible() throws Exception {
  52         final Circle node = new StubCircle();
  53         NodeTest.testBooleanPropertyPropagation(node, "visible", false, true);
  54     }
  55 
  56     @Test public void testPropertyPropagation_centerX() throws Exception {
  57         final Circle node = new StubCircle();
  58         NodeTest.testDoublePropertyPropagation(node, "centerX", 100, 200);
  59     }
  60 
  61     @Test public void testPropertyPropagation_centerY() throws Exception {
  62         final Circle node = new StubCircle();
  63         NodeTest.testDoublePropertyPropagation(node, "centerY", 100, 200);
  64     }
  65 
  66     @Test public void testPropertyPropagation_radius() throws Exception {
  67         final Circle node = new StubCircle();
  68         NodeTest.testDoublePropertyPropagation(node, "radius", 100, 200);
  69     }
  70