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