Changeset 18893 in josm for trunk/test/functional
- Timestamp:
- 2023-11-02T13:14:51+01:00 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
r17275 r18893 12 12 import java.io.FileInputStream; 13 13 import java.io.FileNotFoundException; 14 import java.io.FileOutputStream;15 14 import java.io.IOException; 16 15 import java.io.OutputStreamWriter; 17 16 import java.io.PrintWriter; 18 17 import java.nio.charset.StandardCharsets; 18 import java.nio.file.Files; 19 19 import java.text.MessageFormat; 20 20 import java.util.HashSet; … … 26 26 import org.junit.jupiter.api.BeforeEach; 27 27 import org.junit.jupiter.api.Test; 28 import org.openstreetmap.josm.JOSMFixture;29 28 import org.openstreetmap.josm.TestUtils; 30 29 import org.openstreetmap.josm.data.APIDataSet; … … 43 42 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 44 43 import org.openstreetmap.josm.spi.preferences.Config; 44 import org.openstreetmap.josm.testutils.annotations.TestUser; 45 import org.openstreetmap.josm.tools.JosmRuntimeException; 45 46 import org.openstreetmap.josm.tools.Logging; 46 47 … … 52 53 */ 53 54 @SuppressFBWarnings(value = "CRLF_INJECTION_LOGS") 55 @org.openstreetmap.josm.testutils.annotations.OsmApi(org.openstreetmap.josm.testutils.annotations.OsmApi.APIType.DEV) 56 @TestUser 54 57 class OsmServerBackreferenceReaderTest { 55 58 private static final Logger logger = Logger.getLogger(OsmServerBackreferenceReader.class.getName()); … … 76 79 } 77 80 fail("Cannot find relation "+i); 78 return null;81 throw new JosmRuntimeException("Cannot reach this point due to fail() above"); 79 82 } 80 83 … … 166 169 logger.info("initializing ..."); 167 170 168 JOSMFixture.createFunctionalTestFixture().init();169 170 171 Config.getPref().put("osm-server.auth-method", "basic"); 171 172 … … 197 198 try ( 198 199 PrintWriter pw = new PrintWriter( 199 new OutputStreamWriter( new FileOutputStream(dataSetCacheOutputFile), StandardCharsets.UTF_8)200 new OutputStreamWriter(Files.newOutputStream(dataSetCacheOutputFile.toPath()), StandardCharsets.UTF_8) 200 201 )) { 201 202 logger.info(MessageFormat.format("caching test data set in ''{0}'' ...", dataSetCacheOutputFile.toString()));
Note:
See TracChangeset
for help on using the changeset viewer.