modules/graphics/src/test/java/test/javafx/scene/layout/BackgroundImageTest.java

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

*** 21,34 **** * 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.layout; import javafx.geometry.Side; import javafx.scene.image.Image; import org.junit.Test; import static javafx.scene.layout.BackgroundRepeat.*; import static org.junit.Assert.*; --- 21,37 ---- * 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 test.javafx.scene.layout; import javafx.geometry.Side; import javafx.scene.image.Image; + import javafx.scene.layout.BackgroundImage; + import javafx.scene.layout.BackgroundPosition; + import javafx.scene.layout.BackgroundSize; import org.junit.Test; import static javafx.scene.layout.BackgroundRepeat.*; import static org.junit.Assert.*;
*** 39,50 **** private static final BackgroundPosition POS_2 = BackgroundPosition.DEFAULT; private static final BackgroundSize SIZE_1 = new BackgroundSize(1, 1, true, true, false, true); private static final BackgroundSize SIZE_2 = BackgroundSize.DEFAULT; ! private static final Image IMAGE_1 = new Image("javafx/scene/layout/red.png"); ! private static final Image IMAGE_2 = new Image("javafx/scene/layout/blue.png"); @Test public void instanceCreation() { BackgroundImage image = new BackgroundImage(IMAGE_1, REPEAT, REPEAT, POS_1, SIZE_1); assertEquals(IMAGE_1, image.getImage()); assertEquals(REPEAT, image.getRepeatX()); --- 42,53 ---- private static final BackgroundPosition POS_2 = BackgroundPosition.DEFAULT; private static final BackgroundSize SIZE_1 = new BackgroundSize(1, 1, true, true, false, true); private static final BackgroundSize SIZE_2 = BackgroundSize.DEFAULT; ! private static final Image IMAGE_1 = new Image("test/javafx/scene/layout/red.png"); ! private static final Image IMAGE_2 = new Image("test/javafx/scene/layout/blue.png"); @Test public void instanceCreation() { BackgroundImage image = new BackgroundImage(IMAGE_1, REPEAT, REPEAT, POS_1, SIZE_1); assertEquals(IMAGE_1, image.getImage()); assertEquals(REPEAT, image.getRepeatX());