source: josm/trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTestIT.java@ 17275

Last change on this file since 17275 was 17275, checked in by Don-vip, 3 years ago

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

File size: 1.4 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.tools;
3
4import static org.junit.jupiter.api.Assertions.assertEquals;
5import static org.junit.jupiter.api.Assertions.assertFalse;
6
7import java.util.Collections;
8
9import org.junit.jupiter.api.Test;
10import org.junit.jupiter.api.extension.RegisterExtension;
11import org.openstreetmap.josm.testutils.JOSMTestRules;
12
13import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
14
15/**
16 * Integration tests of {@link Territories} class.
17 */
18class 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}
Note: See TracBrowser for help on using the repository browser.