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.effect;
27
28 import static com.sun.javafx.test.TestHelper.box;
29 import static org.junit.Assert.assertEquals;
30
31 import org.junit.Before;
32 import org.junit.Test;
33
34 public class BloomTest extends EffectsTestBase {
35 private Bloom effect;
36
37 @Before
38 public void setUp() {
39 effect = new Bloom();
40 setupTest(effect);
41 }
42
43 @Test
44 public void testSetThreshold() {
45 // try setting correct value
46 effect.setThreshold(1.0f);
47 assertEquals(1.0f, (float) effect.getThreshold(), 1e-100);
48 pulse();
49 assertEquals(1.0f, (float) ((com.sun.scenario.effect.Bloom)effect.impl_getImpl()).getThreshold(), 1e-100);
50 }
51
52 @Test
53 public void testDefaultThreshold() {
54 // default value should be 0.3
|
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.effect;
27
28 import static com.sun.javafx.test.TestHelper.box;
29 import static org.junit.Assert.assertEquals;
30
31 import com.sun.javafx.FXUnit;
32 import org.junit.Before;
33 import org.junit.Rule;
34 import org.junit.Test;
35
36 public class BloomTest extends EffectsTestBase {
37
38 @Rule
39 public FXUnit fx = new FXUnit();
40
41 private Bloom effect;
42
43 @Before
44 public void setUp() {
45 effect = new Bloom();
46 setupTest(effect);
47 }
48
49 @Test
50 public void testSetThreshold() {
51 // try setting correct value
52 effect.setThreshold(1.0f);
53 assertEquals(1.0f, (float) effect.getThreshold(), 1e-100);
54 pulse();
55 assertEquals(1.0f, (float) ((com.sun.scenario.effect.Bloom)effect.impl_getImpl()).getThreshold(), 1e-100);
56 }
57
58 @Test
59 public void testDefaultThreshold() {
60 // default value should be 0.3
|