Last change
on this file since 11647 was 11202, checked in by Don-vip, 7 years ago |
increase test coverage
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.tools;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.fail;
|
---|
5 |
|
---|
6 | import java.awt.Font;
|
---|
7 | import java.awt.GraphicsEnvironment;
|
---|
8 |
|
---|
9 | import org.junit.Rule;
|
---|
10 | import org.junit.Test;
|
---|
11 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
12 |
|
---|
13 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Unit tests of {@link FontsManager} class.
|
---|
17 | */
|
---|
18 | public class FontsManagerTest {
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Setup test.
|
---|
22 | */
|
---|
23 | @Rule
|
---|
24 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
25 | public JOSMTestRules test = new JOSMTestRules();
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Test method for {@code FontsManager#initialize}
|
---|
29 | */
|
---|
30 | @Test
|
---|
31 | public void testFontsManager() {
|
---|
32 | FontsManager.initialize();
|
---|
33 | boolean found = false;
|
---|
34 | for (Font f : GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts()) {
|
---|
35 | if (f.getName().contains("Droid")) {
|
---|
36 | System.out.println(f);
|
---|
37 | found = true;
|
---|
38 | }
|
---|
39 | }
|
---|
40 | if (!found) {
|
---|
41 | fail("DroidSans font not found");
|
---|
42 | }
|
---|
43 | }
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.