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

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


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   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;
  27 
  28 import java.util.Arrays;
  29 import java.util.Collection;
  30 
  31 import javafx.scene.effect.BlendMode;
  32 import javafx.scene.effect.Shadow;
  33 import javafx.scene.image.Image;
  34 import javafx.scene.shape.Rectangle;
  35 
  36 import org.junit.BeforeClass;
  37 import org.junit.Ignore;
  38 import org.junit.runner.RunWith;
  39 import org.junit.runners.Parameterized;
  40 import org.junit.runners.Parameterized.Parameters;
  41 
  42 import com.sun.javafx.pgstub.StubImageLoaderFactory;
  43 import com.sun.javafx.pgstub.StubPlatformImageInfo;
  44 import com.sun.javafx.pgstub.StubToolkit;
  45 import com.sun.javafx.test.CssMethodsTestBase;
  46 import com.sun.javafx.test.ValueComparator;
  47 import com.sun.javafx.tk.Toolkit;



  48 
  49 @Ignore ("pending RT-35594")
  50 @RunWith(Parameterized.class)
  51 public final class Node_cssMethods_Test extends CssMethodsTestBase {
  52     private static final Node TEST_NODE = new Rectangle();
  53     private static final String TEST_CURSOR_URL = "file:cursor.png";
  54 
  55     @BeforeClass
  56     public static void configureImageLoaderFactory() {
  57         final StubImageLoaderFactory imageLoaderFactory =
  58                 ((StubToolkit) Toolkit.getToolkit()).getImageLoaderFactory();
  59         imageLoaderFactory.reset();
  60         imageLoaderFactory.registerImage(
  61                 TEST_CURSOR_URL,
  62                 new StubPlatformImageInfo(32, 32));
  63     }
  64 
  65     @Parameters
  66     public static Collection data() {
  67         return Arrays.asList(new Object[] {




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   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 test.javafx.scene;
  27 
  28 import java.util.Arrays;
  29 import java.util.Collection;
  30 
  31 import javafx.scene.effect.BlendMode;
  32 import javafx.scene.effect.Shadow;
  33 import javafx.scene.image.Image;
  34 import javafx.scene.shape.Rectangle;
  35 
  36 import org.junit.BeforeClass;
  37 import org.junit.Ignore;
  38 import org.junit.runner.RunWith;
  39 import org.junit.runners.Parameterized;
  40 import org.junit.runners.Parameterized.Parameters;
  41 
  42 import test.com.sun.javafx.pgstub.StubImageLoaderFactory;
  43 import test.com.sun.javafx.pgstub.StubPlatformImageInfo;
  44 import test.com.sun.javafx.pgstub.StubToolkit;
  45 import test.com.sun.javafx.test.CssMethodsTestBase;
  46 import test.com.sun.javafx.test.ValueComparator;
  47 import com.sun.javafx.tk.Toolkit;
  48 import javafx.scene.Cursor;
  49 import javafx.scene.ImageCursor;
  50 import javafx.scene.Node;
  51 
  52 @Ignore ("pending RT-35594")
  53 @RunWith(Parameterized.class)
  54 public final class Node_cssMethods_Test extends CssMethodsTestBase {
  55     private static final Node TEST_NODE = new Rectangle();
  56     private static final String TEST_CURSOR_URL = "file:cursor.png";
  57 
  58     @BeforeClass
  59     public static void configureImageLoaderFactory() {
  60         final StubImageLoaderFactory imageLoaderFactory =
  61                 ((StubToolkit) Toolkit.getToolkit()).getImageLoaderFactory();
  62         imageLoaderFactory.reset();
  63         imageLoaderFactory.registerImage(
  64                 TEST_CURSOR_URL,
  65                 new StubPlatformImageInfo(32, 32));
  66     }
  67 
  68     @Parameters
  69     public static Collection data() {
  70         return Arrays.asList(new Object[] {