Changeset 36263 in osm for applications/editors/josm/plugins
- Timestamp:
- 2024-05-06T21:11:29+02:00 (9 months ago)
- Location:
- applications/editors/josm/plugins/MicrosoftStreetside
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnable.java
r36262 r36263 13 13 import java.util.ArrayList; 14 14 import java.util.List; 15 import java.util.Locale; 15 16 import java.util.Objects; 16 17 import java.util.concurrent.Callable; … … 149 150 final var vintageStart = LocalDate 150 151 .parse(node.getString("vintageStart").replace("GMT", "UTC"), 151 DateTimeFormatter.ofPattern("dd LLL yyyy zzz")) 152 DateTimeFormatter.ofPattern("dd LLL yyyy zzz", Locale.ROOT)) 152 153 .atStartOfDay().toInstant(ZoneOffset.UTC); 153 154 final var vintageEnd = LocalDate 154 155 .parse(node.getString("vintageStart").replace("GMT", "UTC"), 155 DateTimeFormatter.ofPattern("dd LLL yyyy zzz")) 156 DateTimeFormatter.ofPattern("dd LLL yyyy zzz", Locale.ROOT)) 156 157 .atTime(LocalTime.MAX).toInstant(ZoneOffset.UTC); 157 158 final List<String> imageUrlSubdomains = node.getJsonArray("imageUrlSubdomains") -
applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/gui/StreetsidePreferenceSettingTest.java
r36228 r36263 100 100 settings.ok(); 101 101 assertEquals(new StringProperty("streetside.download-mode", "default").get(), 102 DOWNLOAD_MODE.fromLabel(Objects.requireNonNull(((JComboBox<String>) getPrivateFieldValue(settings, "downloadModeComboBox")) 103 .getSelectedItem()).toString()).getPrefId()); 102 DOWNLOAD_MODE.fromLabel(Objects 103 .requireNonNull(((JComboBox<String>) getPrivateFieldValue(settings, "downloadModeComboBox")) 104 .getSelectedItem()) 105 .toString()).getPrefId()); 104 106 } 105 107 } -
applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnableTest.java
r36228 r36263 7 7 import org.junit.jupiter.api.Test; 8 8 import org.openstreetmap.josm.data.Bounds; 9 import org.openstreetmap.josm.plugins.streetside.StreetsideLayer;10 9 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties; 11 10 import org.openstreetmap.josm.testutils.annotations.LayerManager; … … 42 41 } 43 42 44 private void testNumberOfDecodedImages(int expectedNumImgs, Bounds bounds) 45 throws IllegalArgumentException { 46 SequenceDownloadRunnable r = new SequenceDownloadRunnable(StreetsideLayer.getInstance().getData(), bounds); 47 r.run(); 48 assertEquals(expectedNumImgs, StreetsideLayer.getInstance().getData().getImages().size()); 43 private void testNumberOfDecodedImages(int expectedNumImgs, Bounds bounds) throws IllegalArgumentException { 44 SequenceDownloadRunnable r = new SequenceDownloadRunnable(bounds); 45 final var images = r.call(); 46 assertEquals(expectedNumImgs, images.size()); 49 47 } 50 48 }
Note:
See TracChangeset
for help on using the changeset viewer.