modules/graphics/src/test/java/test/javafx/concurrent/TaskEventTest.java

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

*** 21,38 **** * 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.concurrent; import java.util.concurrent.atomic.AtomicBoolean; ! import javafx.concurrent.mocks.EpicFailTask; ! import javafx.concurrent.mocks.InfiniteTask; ! import javafx.concurrent.mocks.MythicalEvent; ! import javafx.concurrent.mocks.SimpleTask; import javafx.event.EventHandler; import org.junit.Test; import static org.junit.Assert.*; /** --- 21,42 ---- * 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.concurrent; import java.util.concurrent.atomic.AtomicBoolean; ! import javafx.concurrent.Task; ! import javafx.concurrent.TaskShim; ! import javafx.concurrent.WorkerStateEvent; ! import test.javafx.concurrent.mocks.EpicFailTask; ! import test.javafx.concurrent.mocks.InfiniteTask; ! import test.javafx.concurrent.mocks.MythicalEvent; ! import test.javafx.concurrent.mocks.SimpleTask; import javafx.event.EventHandler; + import javafx.event.EventType; import org.junit.Test; import static org.junit.Assert.*; /**
*** 478,486 **** assertTrue(result.get()); } private static final class MythicalTask extends SimpleTask { public void setHandler(EventHandler<MythicalEvent> h) { ! super.setEventHandler(MythicalEvent.ANY, h); } } } --- 482,490 ---- assertTrue(result.get()); } private static final class MythicalTask extends SimpleTask { public void setHandler(EventHandler<MythicalEvent> h) { ! TaskShim.setEventHandler(this, MythicalEvent.ANY, h); } } }