Changeset 17677 in josm


Ignore:
Timestamp:
2021-03-27T15:38:17+01:00 (4 years ago)
Author:
simon04
Message:

see #16567 - JUnit 5: use org.junit.jupiter.api.Assumptions

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java

    r17571 r17677  
    77import static org.junit.jupiter.api.Assertions.assertNull;
    88import static org.junit.jupiter.api.Assertions.assertTrue;
    9 import static org.junit.Assume.assumeFalse;
     9import static org.junit.jupiter.api.Assumptions.assumeFalse;
    1010
    1111import java.awt.BorderLayout;
  • trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java

    r17275 r17677  
    77import static org.junit.jupiter.api.Assertions.assertSame;
    88import static org.junit.jupiter.api.Assertions.assertTrue;
    9 import static org.junit.Assume.assumeTrue;
     9import static org.junit.jupiter.api.Assumptions.assumeTrue;
    1010
    1111import java.awt.GraphicsEnvironment;
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java

    r17531 r17677  
    22package org.openstreetmap.josm.gui.preferences.map;
    33
    4 import static org.junit.Assume.assumeFalse;
    5 import static org.junit.Assume.assumeTrue;
    64import static org.junit.jupiter.api.Assertions.assertTrue;
     5import static org.junit.jupiter.api.Assumptions.assumeFalse;
     6import static org.junit.jupiter.api.Assumptions.assumeTrue;
    77
    88import java.io.IOException;
     
    105105        // See https://github.com/apache/ant/pull/121
    106106        assertTrue(errors.isEmpty() && warnings.isEmpty(), displayName + " => " + errors + '\n' + warnings);
    107         assumeTrue(ignoredErrors.toString(), ignoredErrors.isEmpty());
     107        assumeTrue(ignoredErrors.isEmpty(), ignoredErrors.toString());
    108108    }
    109109}
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java

    r17536 r17677  
    22package org.openstreetmap.josm.gui.preferences.map;
    33
    4 import static org.junit.Assume.assumeFalse;
    5 import static org.junit.Assume.assumeTrue;
    64import static org.junit.jupiter.api.Assertions.assertFalse;
    75import static org.junit.jupiter.api.Assertions.assertTrue;
     6import static org.junit.jupiter.api.Assumptions.assumeFalse;
     7import static org.junit.jupiter.api.Assumptions.assumeTrue;
    88
    99import java.io.IOException;
     
    104104        // See https://github.com/apache/ant/pull/121
    105105        assertTrue(errors.isEmpty(), displayName + " => " + errors);
    106         assumeTrue(ignoredErrors.toString(), ignoredErrors.isEmpty());
     106        assumeTrue(ignoredErrors.isEmpty(), ignoredErrors.toString());
    107107    }
    108108
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java

    r17531 r17677  
    22package org.openstreetmap.josm.gui.preferences.validator;
    33
    4 import static org.junit.Assume.assumeFalse;
    5 import static org.junit.Assume.assumeTrue;
    64import static org.junit.jupiter.api.Assertions.assertFalse;
    75import static org.junit.jupiter.api.Assertions.assertTrue;
     6import static org.junit.jupiter.api.Assumptions.assumeFalse;
     7import static org.junit.jupiter.api.Assumptions.assumeTrue;
    88
    99import java.io.IOException;
     
    8989        // See https://github.com/apache/ant/pull/121
    9090        assertTrue(errors.isEmpty(), displayName + " => " + errors);
    91         assumeTrue(ignoredErrors.toString(), ignoredErrors.isEmpty());
     91        assumeTrue(ignoredErrors.isEmpty(), ignoredErrors.toString());
    9292    }
    9393}
  • trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java

    r17275 r17677  
    22package org.openstreetmap.josm.io;
    33
    4 import static org.junit.Assume.assumeFalse;
     4import static org.junit.jupiter.api.Assumptions.assumeFalse;
    55
    66import java.io.IOException;
  • trunk/test/unit/org/openstreetmap/josm/tools/JosmDecimalFormatSymbolsProviderTest.java

    r17280 r17677  
    22package org.openstreetmap.josm.tools;
    33
    4 import static org.junit.Assume.assumeTrue;
    54import static org.junit.jupiter.api.Assertions.assertEquals;
    65import static org.junit.jupiter.api.Assertions.assertTrue;
     6import static org.junit.jupiter.api.Assumptions.assumeTrue;
    77
    88import java.text.DecimalFormat;
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java

    r17540 r17677  
    22package org.openstreetmap.josm.tools;
    33
    4 import static org.junit.Assume.assumeNotNull;
    54import static org.junit.jupiter.api.Assertions.assertEquals;
    65import static org.junit.jupiter.api.Assertions.assertFalse;
     
    173172    @Test
    174173    void testGetInstalledFonts() {
    175         assumeNotNull(FileSystems.getDefault()); // weird NPE on Jenkins
     174        assumeTrue(FileSystems.getDefault() != null); // weird NPE on Jenkins
    176175        assumeTrue(Utils.getJavaVersion() < 16 || PlatformManager.isPlatformWindows()); // No idea why the test fails with Java 16+ on Linux
    177176        Collection<String> fonts = hook.getInstalledFonts();
Note: See TracChangeset for help on using the changeset viewer.