Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (4 years ago)
Author:
Don-vip
Message:

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java

    r15469 r17275  
    22package org.openstreetmap.josm.tools;
    33
    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;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertFalse;
     6import static org.junit.jupiter.api.Assertions.assertNotNull;
     7import static org.junit.jupiter.api.Assertions.assertTrue;
     8import static org.junit.jupiter.api.Assumptions.assumeTrue;
    89
    910import java.io.File;
    1011import java.io.IOException;
    1112
    12 import org.junit.Assume;
    13 import org.junit.BeforeClass;
    14 import org.junit.Test;
     13import org.junit.jupiter.api.BeforeAll;
     14import org.junit.jupiter.api.Test;
    1515import org.openstreetmap.josm.JOSMFixture;
    1616import org.openstreetmap.josm.spi.preferences.Config;
     
    1919 * Unit tests of {@link PlatformHookOsx} class.
    2020 */
    21 public class PlatformHookOsxTest {
     21class PlatformHookOsxTest {
    2222
    2323    static PlatformHookOsx hook;
     
    2626     * Setup test.
    2727     */
    28     @BeforeClass
     28    @BeforeAll
    2929    public static void setUp() {
    3030        JOSMFixture.createUnitTestFixture().init();
     
    3636     */
    3737    @Test
    38     public void testStartupHook() {
     38    void testStartupHook() {
    3939        hook.startupHook((a, b, c, d) -> System.out.println("callback"));
    4040    }
     
    4444     */
    4545    @Test
    46     public void testAfterPrefStartupHook() {
     46    void testAfterPrefStartupHook() {
    4747        hook.afterPrefStartupHook();
    4848    }
     
    5353     */
    5454    @Test
    55     public void testOpenUrl() throws IOException {
    56         Assume.assumeTrue(PlatformManager.isPlatformOsx());
     55    void testOpenUrl() throws IOException {
     56        assumeTrue(PlatformManager.isPlatformOsx());
    5757        hook.openUrl(Config.getUrls().getJOSMWebsite());
    5858    }
     
    6262     */
    6363    @Test
    64     public void testGetDefaultCacheDirectory() {
     64    void testGetDefaultCacheDirectory() {
    6565        File cache = hook.getDefaultCacheDirectory();
    6666        assertNotNull(cache);
     
    7474     */
    7575    @Test
    76     public void testGetDefaultPrefDirectory() {
     76    void testGetDefaultPrefDirectory() {
    7777        File cache = hook.getDefaultPrefDirectory();
    7878        assertNotNull(cache);
     
    8686     */
    8787    @Test
    88     public void testGetDefaultStyle() {
     88    void testGetDefaultStyle() {
    8989        assertEquals("com.apple.laf.AquaLookAndFeel", hook.getDefaultStyle());
    9090    }
     
    9494     */
    9595    @Test
    96     public void testGetOSDescription() {
     96    void testGetOSDescription() {
    9797        String os = hook.getOSDescription();
    9898        if (PlatformManager.isPlatformOsx()) {
     
    107107     */
    108108    @Test
    109     public void testInitSystemShortcuts() {
     109    void testInitSystemShortcuts() {
    110110        hook.initSystemShortcuts();
    111111    }
Note: See TracChangeset for help on using the changeset viewer.