1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.tools;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
5 | import static org.junit.jupiter.api.Assertions.assertFalse;
|
---|
6 |
|
---|
7 | import java.util.Collections;
|
---|
8 |
|
---|
9 | import org.junit.jupiter.api.Test;
|
---|
10 | import org.junit.jupiter.api.extension.RegisterExtension;
|
---|
11 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
12 |
|
---|
13 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Integration tests of {@link Territories} class.
|
---|
17 | */
|
---|
18 | class TerritoriesTestIT {
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Test rules.
|
---|
22 | */
|
---|
23 | @RegisterExtension
|
---|
24 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
25 | public JOSMTestRules rules = new JOSMTestRules().projection();
|
---|
26 |
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * Test of {@link Territories#initialize} method.
|
---|
30 | */
|
---|
31 | @Test
|
---|
32 | void testUtilityClass() {
|
---|
33 | Logging.clearLastErrorAndWarnings();
|
---|
34 | Territories.initialize();
|
---|
35 | assertEquals(Collections.emptyList(), Logging.getLastErrorAndWarnings(), "no errors or warnings");
|
---|
36 | assertFalse(Territories.customTagsCache.isEmpty(), "customTagsCache is non empty");
|
---|
37 | assertFalse(Territories.iso3166Cache.isEmpty(), "iso3166Cache is non empty");
|
---|
38 | assertFalse(Territories.taginfoCache.isEmpty(), "taginfoCache is non empty");
|
---|
39 | assertFalse(Territories.taginfoGeofabrikCache.isEmpty(), "taginfoGeofabrikCache is non empty");
|
---|
40 | }
|
---|
41 | }
|
---|