Changeset 17275 in josm for trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java
- Timestamp:
- 2020-10-28T20:41:00+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java
r15469 r17275 2 2 package org.openstreetmap.josm.tools; 3 3 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertFalse; 6 import static org.junit.Assert.assertNotNull; 7 import static org.junit.Assert.assertTrue; 4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertNotNull; 7 import static org.junit.jupiter.api.Assertions.assertTrue; 8 import static org.junit.jupiter.api.Assumptions.assumeTrue; 8 9 9 10 import java.io.File; 10 11 import java.io.IOException; 11 12 12 import org.junit.Assume; 13 import org.junit.BeforeClass; 14 import org.junit.Test; 13 import org.junit.jupiter.api.BeforeAll; 14 import org.junit.jupiter.api.Test; 15 15 import org.openstreetmap.josm.JOSMFixture; 16 16 import org.openstreetmap.josm.spi.preferences.Config; … … 19 19 * Unit tests of {@link PlatformHookOsx} class. 20 20 */ 21 publicclass PlatformHookOsxTest {21 class PlatformHookOsxTest { 22 22 23 23 static PlatformHookOsx hook; … … 26 26 * Setup test. 27 27 */ 28 @Before Class28 @BeforeAll 29 29 public static void setUp() { 30 30 JOSMFixture.createUnitTestFixture().init(); … … 36 36 */ 37 37 @Test 38 publicvoid testStartupHook() {38 void testStartupHook() { 39 39 hook.startupHook((a, b, c, d) -> System.out.println("callback")); 40 40 } … … 44 44 */ 45 45 @Test 46 publicvoid testAfterPrefStartupHook() {46 void testAfterPrefStartupHook() { 47 47 hook.afterPrefStartupHook(); 48 48 } … … 53 53 */ 54 54 @Test 55 publicvoid testOpenUrl() throws IOException {56 Assume.assumeTrue(PlatformManager.isPlatformOsx());55 void testOpenUrl() throws IOException { 56 assumeTrue(PlatformManager.isPlatformOsx()); 57 57 hook.openUrl(Config.getUrls().getJOSMWebsite()); 58 58 } … … 62 62 */ 63 63 @Test 64 publicvoid testGetDefaultCacheDirectory() {64 void testGetDefaultCacheDirectory() { 65 65 File cache = hook.getDefaultCacheDirectory(); 66 66 assertNotNull(cache); … … 74 74 */ 75 75 @Test 76 publicvoid testGetDefaultPrefDirectory() {76 void testGetDefaultPrefDirectory() { 77 77 File cache = hook.getDefaultPrefDirectory(); 78 78 assertNotNull(cache); … … 86 86 */ 87 87 @Test 88 publicvoid testGetDefaultStyle() {88 void testGetDefaultStyle() { 89 89 assertEquals("com.apple.laf.AquaLookAndFeel", hook.getDefaultStyle()); 90 90 } … … 94 94 */ 95 95 @Test 96 publicvoid testGetOSDescription() {96 void testGetOSDescription() { 97 97 String os = hook.getOSDescription(); 98 98 if (PlatformManager.isPlatformOsx()) { … … 107 107 */ 108 108 @Test 109 publicvoid testInitSystemShortcuts() {109 void testInitSystemShortcuts() { 110 110 hook.initSystemShortcuts(); 111 111 }
Note:
See TracChangeset
for help on using the changeset viewer.