modules/graphics/src/test/java/test/javafx/stage/WindowEventTest.java
Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:
*** 21,40 ****
* 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.stage;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import org.junit.Test;
public class WindowEventTest {
@Test public void testConstructor() {
! Window w = new Window();
WindowEvent e = new WindowEvent(w, WindowEvent.WINDOW_HIDING);
assertSame(WindowEvent.WINDOW_HIDING, e.getEventType());
assertFalse(e.isConsumed());
assertSame(w, e.getSource());
assertSame(w, e.getTarget());
--- 21,43 ----
* 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.stage;
+ import javafx.stage.Window;
+ import javafx.stage.WindowEvent;
+ import javafx.stage.WindowShim;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import org.junit.Test;
public class WindowEventTest {
@Test public void testConstructor() {
! Window w = new WindowShim();
WindowEvent e = new WindowEvent(w, WindowEvent.WINDOW_HIDING);
assertSame(WindowEvent.WINDOW_HIDING, e.getEventType());
assertFalse(e.isConsumed());
assertSame(w, e.getSource());
assertSame(w, e.getTarget());