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

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


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.animation;
  27 
  28 import com.sun.javafx.animation.TickCalculation;
  29 import com.sun.scenario.animation.shared.InterpolationInterval;



  30 import javafx.beans.property.Property;
  31 import javafx.beans.property.SimpleLongProperty;
  32 import javafx.util.Duration;
  33 import static org.junit.Assert.assertEquals;
  34 
  35 import org.junit.Test;
  36 
  37 public class InterpolatorTest {
  38 
  39     private static final double EPSILON = 1e-12;
  40     private static final float EPSILON_FLOAT = 1e-6f;
  41     private static final DummyInterpolatable START = new DummyInterpolatable(0);
  42     private static final DummyInterpolatable END   = new DummyInterpolatable(10);
  43     
  44     @Test
  45     public void testInterpolateWithObjects() {
  46         final DummyInterpolatable i1 = new DummyInterpolatable(1);
  47         final DummyInterpolatable i2 = new DummyInterpolatable(4);
  48         final Object o = new Object();
  49         




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package test.javafx.animation;
  27 
  28 import com.sun.javafx.animation.TickCalculation;
  29 import com.sun.scenario.animation.shared.InterpolationInterval;
  30 import javafx.animation.Interpolatable;
  31 import javafx.animation.Interpolator;
  32 import javafx.animation.KeyValue;
  33 import javafx.beans.property.Property;
  34 import javafx.beans.property.SimpleLongProperty;
  35 import javafx.util.Duration;
  36 import static org.junit.Assert.assertEquals;
  37 
  38 import org.junit.Test;
  39 
  40 public class InterpolatorTest {
  41 
  42     private static final double EPSILON = 1e-12;
  43     private static final float EPSILON_FLOAT = 1e-6f;
  44     private static final DummyInterpolatable START = new DummyInterpolatable(0);
  45     private static final DummyInterpolatable END   = new DummyInterpolatable(10);
  46     
  47     @Test
  48     public void testInterpolateWithObjects() {
  49         final DummyInterpolatable i1 = new DummyInterpolatable(1);
  50         final DummyInterpolatable i2 = new DummyInterpolatable(4);
  51         final Object o = new Object();
  52