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 com.sun.javafx.css;
27
28 import static org.junit.Assert.assertEquals;
29 import static org.junit.Assert.assertFalse;
30 import static org.junit.Assert.assertTrue;
31
32 import com.sun.javafx.css.converters.StringConverter;
33 import com.sun.javafx.css.parser.CSSParser;
34 import javafx.scene.text.Font;
35
36 import org.junit.Test;
37
38 import com.sun.javafx.css.converters.SizeConverter;
39 import java.io.ByteArrayInputStream;
40 import java.io.ByteArrayOutputStream;
41 import java.io.DataInputStream;
42 import java.io.DataOutputStream;
43 import java.io.IOException;
44 import javafx.css.ParsedValue;
45
46 public class ParsedValueTest {
47
48 public ParsedValueTest() {
49 }
50
51 /**
52 * Test of getValue method, of class ParsedValue.
53 */
54 @Test
55 public void testGetValue() {
56 //System.out.println("getValue");
57 ParsedValue<Size,Size> instance =
58 new ParsedValueImpl<Size,Size>(new Size(100.0, SizeUnits.PERCENT), null);
59 Size expResult = new Size(100.0, SizeUnits.PERCENT);;
60 Size result = instance.getValue();
61 assertEquals(expResult, result);
62 }
63
64 /**
|
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.css;
27
28 import static org.junit.Assert.assertEquals;
29 import static org.junit.Assert.assertFalse;
30 import static org.junit.Assert.assertTrue;
31
32 import com.sun.javafx.css.ParsedValueImpl;
33 import javafx.css.StyleConverter.StringStore;
34 import javafx.css.converter.SizeConverter;
35
36 import javafx.scene.text.Font;
37
38 import org.junit.Test;
39
40 import java.io.ByteArrayInputStream;
41 import java.io.ByteArrayOutputStream;
42 import java.io.DataInputStream;
43 import java.io.DataOutputStream;
44 import java.io.IOException;
45
46 public class ParsedValueTest {
47
48 public ParsedValueTest() {
49 }
50
51 /**
52 * Test of getValue method, of class ParsedValue.
53 */
54 @Test
55 public void testGetValue() {
56 //System.out.println("getValue");
57 ParsedValue<Size,Size> instance =
58 new ParsedValueImpl<Size,Size>(new Size(100.0, SizeUnits.PERCENT), null);
59 Size expResult = new Size(100.0, SizeUnits.PERCENT);;
60 Size result = instance.getValue();
61 assertEquals(expResult, result);
62 }
63
64 /**
|