[16196] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.tools;
|
---|
| 3 |
|
---|
[17275] | 4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
| 5 | import static org.junit.jupiter.api.Assertions.assertFalse;
|
---|
[16196] | 6 |
|
---|
| 7 | import java.util.Collections;
|
---|
| 8 |
|
---|
[17275] | 9 | import org.junit.jupiter.api.Test;
|
---|
| 10 | import org.junit.jupiter.api.extension.RegisterExtension;
|
---|
[16196] | 11 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
| 12 |
|
---|
| 13 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
| 14 |
|
---|
| 15 | /**
|
---|
[16215] | 16 | * Integration tests of {@link Territories} class.
|
---|
[16196] | 17 | */
|
---|
[17275] | 18 | class TerritoriesTestIT {
|
---|
[16196] | 19 |
|
---|
| 20 | /**
|
---|
| 21 | * Test rules.
|
---|
| 22 | */
|
---|
[17275] | 23 | @RegisterExtension
|
---|
[16196] | 24 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
[16602] | 25 | public JOSMTestRules rules = new JOSMTestRules().projection();
|
---|
[16196] | 26 |
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * Test of {@link Territories#initialize} method.
|
---|
| 30 | */
|
---|
| 31 | @Test
|
---|
[17275] | 32 | void testUtilityClass() {
|
---|
[16196] | 33 | Logging.clearLastErrorAndWarnings();
|
---|
| 34 | Territories.initialize();
|
---|
[17275] | 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");
|
---|
[16196] | 40 | }
|
---|
| 41 | }
|
---|