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 test3d;
27
28 import java.util.ArrayList;
29 import java.util.Collection;
30 import java.util.concurrent.atomic.AtomicBoolean;
31 import javafx.application.ConditionalFeature;
32 import javafx.application.Platform;
33 import javafx.scene.AmbientLight;
34 import javafx.scene.Group;
35 import javafx.scene.PerspectiveCamera;
36 import javafx.scene.PointLight;
37 import javafx.scene.Scene;
38 import javafx.scene.image.WritableImage;
39 import javafx.scene.paint.Color;
40 import javafx.scene.paint.PhongMaterial;
41 import javafx.scene.shape.Box;
42 import javafx.scene.shape.Shape3D;
43 import javafx.scene.shape.Sphere;
44 import javafx.stage.Stage;
45 import org.junit.Test;
46 import org.junit.runner.RunWith;
47 import org.junit.runners.Parameterized;
48 import testharness.VisualTestBase;
49
50 /**
51 * 3D Snapshot validation tests.
52 */
53 @RunWith(Parameterized.class)
54 public class Snapshot3DTest extends VisualTestBase {
55
56 private static Collection params = null;
57
58 private static final Object[] pUseSphere = { Boolean.FALSE, Boolean.TRUE };
59 private static final Object[] pNumLights = { 0, 1, 2, 3 };
60
61 @Parameterized.Parameters
62 public static Collection getParams() {
63 if (params == null) {
64 params = new ArrayList();
65 for (Object o0 : pUseSphere) {
66 for (Object o1 : pNumLights) {
67 params.add(new Object[] { o0, o1 });
68 }
|
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.robot.test3d;
27
28 import java.util.ArrayList;
29 import java.util.Collection;
30 import java.util.concurrent.atomic.AtomicBoolean;
31 import javafx.application.ConditionalFeature;
32 import javafx.application.Platform;
33 import javafx.scene.AmbientLight;
34 import javafx.scene.Group;
35 import javafx.scene.PerspectiveCamera;
36 import javafx.scene.PointLight;
37 import javafx.scene.Scene;
38 import javafx.scene.image.WritableImage;
39 import javafx.scene.paint.Color;
40 import javafx.scene.paint.PhongMaterial;
41 import javafx.scene.shape.Box;
42 import javafx.scene.shape.Shape3D;
43 import javafx.scene.shape.Sphere;
44 import javafx.stage.Stage;
45 import org.junit.Test;
46 import org.junit.runner.RunWith;
47 import org.junit.runners.Parameterized;
48 import test.robot.testharness.VisualTestBase;
49
50 /**
51 * 3D Snapshot validation tests.
52 */
53 @RunWith(Parameterized.class)
54 public class Snapshot3DTest extends VisualTestBase {
55
56 private static Collection params = null;
57
58 private static final Object[] pUseSphere = { Boolean.FALSE, Boolean.TRUE };
59 private static final Object[] pNumLights = { 0, 1, 2, 3 };
60
61 @Parameterized.Parameters
62 public static Collection getParams() {
63 if (params == null) {
64 params = new ArrayList();
65 for (Object o0 : pUseSphere) {
66 for (Object o1 : pNumLights) {
67 params.add(new Object[] { o0, o1 });
68 }
|