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

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

@@ -21,44 +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 javafx.animation;
+package test.javafx.animation;
 
 
 import javafx.animation.Animation.Status;
 import javafx.util.Duration;
-import com.sun.scenario.animation.AbstractMasterTimerMock;
-import com.sun.scenario.animation.shared.ClipEnvelopeMock;
+import test.com.sun.scenario.animation.shared.ClipEnvelopeMock;
 import org.junit.Before;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
 
 public class AnimationSetRateTest {
 
     private static final double EPSILON = 1e-12;
 
     private AbstractMasterTimerMock timer;
-    private Animation animation;
+    private AnimationImpl animation;
     private ClipEnvelopeMock clipEnvelope;
 
     @Before
     public void setUp() throws Exception {
         timer = new AbstractMasterTimerMock();
         clipEnvelope = new ClipEnvelopeMock();
         animation = new AnimationImpl(timer, clipEnvelope, 1);
-        animation.setCycleDuration(Duration.millis(1000));
+        animation.shim_setCycleDuration(Duration.millis(1000));
         clipEnvelope.setAnimation(animation);
     }
 
     private void assertAnimation(double rate, double currentRate, Status status, boolean addedToMasterTimer) {
         assertEquals(rate, animation.getRate(), EPSILON);
         assertEquals(currentRate, animation.getCurrentRate(), EPSILON);
         assertEquals(status, animation.getStatus());
-        assertEquals(addedToMasterTimer, timer.containsPulseReceiver(animation.pulseReceiver));
+        assertEquals(addedToMasterTimer, timer.containsPulseReceiver(animation.shim_pulseReceiver()));
     }
 
     @Test
     public void testSetRate() {
         // changing the rate of a playing animation