1 /*
   2  * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   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.scene.transform;
  27 
  28 import java.util.Arrays;
  29 import java.util.Collection;
  30 
  31 import org.junit.runner.RunWith;
  32 import org.junit.runners.Parameterized;
  33 import org.junit.runners.Parameterized.Parameters;
  34 
  35 import com.sun.javafx.test.PropertiesTestBase;
  36 import javafx.geometry.Point3D;
  37 
  38 @RunWith(Parameterized.class)
  39 public class Transform_properties_Test extends PropertiesTestBase {
  40     @Parameters
  41     public static Collection data() {
  42         final Affine a = new Affine(
  43                 1,  2,  3,  4,
  44                 5,  6,  7,  8,
  45                 9, 10, 11, 12);
  46 
  47         final Rotate r = new Rotate();
  48         final Shear s = new Shear();
  49         final Translate t = new Translate();
  50         final Scale c = new Scale();
  51 
  52         return Arrays.asList(new Object[] {
  53             config(a, "mxx", 10.0, 20.0),
  54             config(a, "mxy", 10.0, 20.0),
  55             config(a, "mxz", 10.0, 20.0),
  56             config(a, "tx", 10.0, 20.0),
  57             config(a, "myx", 10.0, 20.0),
  58             config(a, "myy", 10.0, 20.0),
  59             config(a, "myz", 10.0, 20.0),
  60             config(a, "ty", 10.0, 20.0),
  61             config(a, "mzx", 10.0, 20.0),
  62             config(a, "mzy", 10.0, 20.0),
  63             config(a, "mzz", 10.0, 20.0),
  64             config(a, "tz", 10.0, 20.0),
  65             config(r, "angle", 10.0, 20.0),
  66             config(r, "axis", new Point3D(10, 20, 30), new Point3D(30, 20, 10)),
  67             config(r, "pivotX", 10.0, 20.0),
  68             config(r, "pivotY", 10.0, 20.0),
  69             config(r, "pivotZ", 10.0, 20.0),
  70             config(s, "x", 10.0, 20.0),
  71             config(s, "y", 10.0, 20.0),
  72             config(s, "pivotX", 10.0, 20.0),
  73             config(s, "pivotY", 10.0, 20.0),
  74             config(t, "x", 10.0, 20.0),
  75             config(t, "y", 10.0, 20.0),
  76             config(t, "z", 10.0, 20.0),
  77             config(c, "x", 10.0, 20.0),
  78             config(c, "y", 10.0, 20.0),
  79             config(c, "z", 10.0, 20.0),
  80             config(c, "pivotX", 10.0, 20.0),
  81             config(c, "pivotY", 10.0, 20.0),
  82             config(c, "pivotZ", 10.0, 20.0),
  83         });
  84     }
  85 
  86     public Transform_properties_Test(final Configuration configuration) {
  87         super(configuration);
  88     }
  89 }