modules/graphics/src/test/java/javafx/scene/shape/EllipseTest.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.NGEllipse;
  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 org.junit.Test;
  34 
  35 import static com.sun.javafx.test.TestHelper.assertSimilar;
  36 import static org.junit.Assert.assertFalse;
  37 import static org.junit.Assert.assertNotNull;
  38 
  39 
  40 public class EllipseTest {
  41 



  42     @Test public void testPropertyPropagation_visible() throws Exception {
  43         final Ellipse node = new StubEllipse();
  44         NodeTest.testBooleanPropertyPropagation(node, "visible", false, true);
  45     }
  46 
  47     @Test public void testPropertyPropagation_centerX() throws Exception {
  48         final Ellipse node = new StubEllipse();
  49         NodeTest.testDoublePropertyPropagation(node, "centerX", 100, 200);
  50     }
  51 
  52     @Test public void testPropertyPropagation_centerY() throws Exception {
  53         final Ellipse node = new StubEllipse();
  54         NodeTest.testDoublePropertyPropagation(node, "centerY", 100, 200);
  55     }
  56 
  57     @Test public void testPropertyPropagation_radiusX() throws Exception {
  58         final Ellipse node = new StubEllipse();
  59         NodeTest.testDoublePropertyPropagation(node, "radiusX", 100, 200);
  60     }
  61 




   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.NGEllipse;
  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 org.junit.Rule;
  35 import org.junit.Test;
  36 
  37 import static com.sun.javafx.test.TestHelper.assertSimilar;
  38 import static org.junit.Assert.assertFalse;
  39 import static org.junit.Assert.assertNotNull;
  40 
  41 
  42 public class EllipseTest {
  43 
  44     @Rule
  45     public FXUnit fx = new FXUnit();
  46 
  47     @Test public void testPropertyPropagation_visible() throws Exception {
  48         final Ellipse node = new StubEllipse();
  49         NodeTest.testBooleanPropertyPropagation(node, "visible", false, true);
  50     }
  51 
  52     @Test public void testPropertyPropagation_centerX() throws Exception {
  53         final Ellipse node = new StubEllipse();
  54         NodeTest.testDoublePropertyPropagation(node, "centerX", 100, 200);
  55     }
  56 
  57     @Test public void testPropertyPropagation_centerY() throws Exception {
  58         final Ellipse node = new StubEllipse();
  59         NodeTest.testDoublePropertyPropagation(node, "centerY", 100, 200);
  60     }
  61 
  62     @Test public void testPropertyPropagation_radiusX() throws Exception {
  63         final Ellipse node = new StubEllipse();
  64         NodeTest.testDoublePropertyPropagation(node, "radiusX", 100, 200);
  65     }
  66