modules/graphics/src/test/java/test/javafx/animation/ParallelTransitionPlayTest.java

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

@@ -21,14 +21,19 @@
  * 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.animation;
+package test.javafx.animation;
 
 import com.sun.javafx.animation.TickCalculation;
 import javafx.animation.Animation.Status;
+import javafx.animation.Interpolator;
+import javafx.animation.ParallelTransition;
+import javafx.animation.ParallelTransitionShim;
+import javafx.animation.Transition;
+import javafx.animation.TransitionShim;
 import javafx.beans.property.LongProperty;
 import javafx.beans.property.SimpleLongProperty;
 import javafx.util.Duration;
 import static org.junit.Assert.assertEquals;
 import org.junit.Before;

@@ -50,12 +55,12 @@
     Transition childByX;
 
     @Before
     public void setUp() {
         amt = new AbstractMasterTimerMock();
-        pt = new ParallelTransition(amt);
-        child1X = new Transition() {
+        pt = ParallelTransitionShim.getParallelTransition(amt);
+        child1X = new TransitionShim() {
 
             {
                 setCycleDuration(Duration.minutes(1));
                 setInterpolator(Interpolator.LINEAR);
             }

@@ -63,11 +68,11 @@
             @Override
             protected void interpolate(double d) {
                 xProperty.set(Math.round(d * 60000));
             }
         };
-        child1Y = new Transition() {
+        child1Y = new TransitionShim() {
 
             {
                 setCycleDuration(Duration.seconds(10));
                 setInterpolator(Interpolator.LINEAR);
             }

@@ -75,11 +80,11 @@
             @Override
             protected void interpolate(double d) {
                 yProperty.set(Math.round(d * 10000));
             }
         };
-        childByX = new Transition() {
+        childByX = new TransitionShim() {
             {
                 setCycleDuration(Duration.seconds(1));
                 setInterpolator(Interpolator.LINEAR);
             }
 

@@ -89,11 +94,11 @@
             protected void interpolate(double frac) {
                 xProperty.set(Math.round(lastX + frac * 1000));
             }
 
             @Override
-            void impl_sync(boolean forceSync) {
+            public void impl_sync(boolean forceSync) {
                 super.impl_sync(forceSync);
                 if (forceSync) {
                     lastX = xProperty.get();
                 }
             }