Changeset 19103 in josm for trunk/test
- Timestamp:
- 2024-06-13T00:23:03+02:00 (5 months ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java
r18985 r19103 13 13 import org.junit.jupiter.api.BeforeAll; 14 14 import org.junit.jupiter.api.Test; 15 import org.junit.jupiter.api.condition.EnabledIf; 16 import org.junit.jupiter.api.condition.EnabledOnOs; 17 import org.junit.jupiter.api.condition.OS; 15 18 import org.openstreetmap.josm.spi.preferences.Config; 16 19 … … 35 38 @Test 36 39 void testStartupHook() { 37 hook.startupHook((a, b, c, d) -> System.out.println("java callback"), u -> System.out.println("webstart callback"),40 hook.startupHook((a, b, c, d) -> System.out.println("java callback"), 38 41 (a, b, c) -> System.out.println("sanity check callback")); 39 42 } … … 51 54 * @throws IOException if an error occurs 52 55 */ 56 @EnabledOnOs(OS.MAC) 53 57 @Test 54 58 void testOpenUrl() throws IOException { 55 assumeTrue(PlatformManager.isPlatformOsx());56 59 hook.openUrl(Config.getUrls().getJOSMWebsite()); 57 60 } -
trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java
r18985 r19103 46 46 void testStartupHook() { 47 47 final PlatformHook.JavaExpirationCallback javaCallback = (a, b, c, d) -> System.out.println("java callback"); 48 final PlatformHook.WebStartMigrationCallback webstartCallback = u -> System.out.println("webstart callback");49 48 final PlatformHook.SanityCheckCallback sanityCheckCallback = (a, b, c) -> System.out.println("sanity check callback"); 50 assertDoesNotThrow(() -> hook.startupHook(javaCallback, webstartCallback,sanityCheckCallback));49 assertDoesNotThrow(() -> hook.startupHook(javaCallback, sanityCheckCallback)); 51 50 } 52 51 -
trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java
r19092 r19103 354 354 355 355 /** 356 * Tests if readBytesFromStream handles null streams (might happen when there is no data on error stream)357 * @throws IOException in case of I/O error358 * @deprecated {@link Utils#readBytesFromStream(InputStream)} is deprecated since the JVM has the same functionality.359 */360 @Test361 @Deprecated362 void testNullStreamForReadBytesFromStream() throws IOException {363 assertEquals(0, Utils.readBytesFromStream(null).length, "Empty on null stream");364 }365 366 /**367 356 * Test of {@link Utils#getLevenshteinDistance} method. 368 357 */
Note:
See TracChangeset
for help on using the changeset viewer.