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 com.sun.javafx.css.converters.EnumConverter;
29 import com.sun.javafx.css.converters.StringConverter;
30 import com.sun.javafx.css.parser.CSSParser;
31 import javafx.css.ParsedValue;
32 import javafx.css.StyleConverter;
33 import javafx.css.StyleOrigin;
34
35 import java.io.ByteArrayInputStream;
36 import java.io.ByteArrayOutputStream;
37 import java.io.DataInputStream;
38 import java.io.DataOutputStream;
39 import java.io.IOException;
40 import java.net.URL;
41 import java.util.Collections;
42 import java.util.List;
43 import java.util.Locale;
44 import java.util.Map;
45
46 import javafx.css.StyleableProperty;
47 import javafx.geometry.Orientation;
49 import javafx.geometry.VPos;
50 import javafx.scene.Group;
51 import javafx.scene.Scene;
52 import javafx.scene.layout.StackPane;
53 import javafx.scene.paint.Color;
54 import javafx.scene.paint.LinearGradient;
55 import javafx.scene.paint.Paint;
56 import javafx.scene.paint.RadialGradient;
57 import javafx.scene.shape.Rectangle;
58 import javafx.scene.text.Font;
59 import javafx.scene.text.FontSmoothingType;
60 import javafx.scene.text.TextAlignment;
61 import javafx.stage.Stage;
62 import org.junit.*;
63 import static org.junit.Assert.*;
64 import static org.junit.Assert.assertEquals;
65
66
67 public class StylesheetTest {
68
69 String testURL = null;
70
71 public StylesheetTest() {
72 testURL = getClass().getResource("HonorDeveloperSettingsTest_UA.css").toExternalForm();
73 }
74
75 /**
76 * Test of getUrl method, of class Stylesheet.
77 */
78 @Test
79 public void testGetUrl() {
80 Stylesheet instance = new Stylesheet();
81 URL expResult = null;
82 String result = instance.getUrl();
83 assertEquals(expResult, result);
84
85 instance = new Stylesheet(testURL);
86 result = instance.getUrl();
87 assertEquals(testURL, result);
88 }
|
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 com.sun.javafx.FXUnit;
29 import com.sun.javafx.css.converters.EnumConverter;
30 import com.sun.javafx.css.converters.StringConverter;
31 import com.sun.javafx.css.parser.CSSParser;
32 import javafx.css.ParsedValue;
33 import javafx.css.StyleConverter;
34 import javafx.css.StyleOrigin;
35
36 import java.io.ByteArrayInputStream;
37 import java.io.ByteArrayOutputStream;
38 import java.io.DataInputStream;
39 import java.io.DataOutputStream;
40 import java.io.IOException;
41 import java.net.URL;
42 import java.util.Collections;
43 import java.util.List;
44 import java.util.Locale;
45 import java.util.Map;
46
47 import javafx.css.StyleableProperty;
48 import javafx.geometry.Orientation;
50 import javafx.geometry.VPos;
51 import javafx.scene.Group;
52 import javafx.scene.Scene;
53 import javafx.scene.layout.StackPane;
54 import javafx.scene.paint.Color;
55 import javafx.scene.paint.LinearGradient;
56 import javafx.scene.paint.Paint;
57 import javafx.scene.paint.RadialGradient;
58 import javafx.scene.shape.Rectangle;
59 import javafx.scene.text.Font;
60 import javafx.scene.text.FontSmoothingType;
61 import javafx.scene.text.TextAlignment;
62 import javafx.stage.Stage;
63 import org.junit.*;
64 import static org.junit.Assert.*;
65 import static org.junit.Assert.assertEquals;
66
67
68 public class StylesheetTest {
69
70 @org.junit.Rule
71 public final FXUnit fx = new FXUnit();
72
73 String testURL = null;
74
75 public StylesheetTest() {
76 testURL = getClass().getResource("HonorDeveloperSettingsTest_UA.css").toExternalForm();
77 }
78
79 /**
80 * Test of getUrl method, of class Stylesheet.
81 */
82 @Test
83 public void testGetUrl() {
84 Stylesheet instance = new Stylesheet();
85 URL expResult = null;
86 String result = instance.getUrl();
87 assertEquals(expResult, result);
88
89 instance = new Stylesheet(testURL);
90 result = instance.getUrl();
91 assertEquals(testURL, result);
92 }
|