Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (3 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/gui/autofilter/AutoFilterRuleTest.java

    r15843 r17275  
    22package org.openstreetmap.josm.gui.autofilter;
    33
    4 import static org.junit.Assert.assertArrayEquals;
    5 import static org.junit.Assert.assertEquals;
     4import static org.junit.jupiter.api.Assertions.assertArrayEquals;
     5import static org.junit.jupiter.api.Assertions.assertEquals;
    66
    77import java.util.NoSuchElementException;
     
    99import java.util.stream.IntStream;
    1010
    11 import org.junit.Rule;
    12 import org.junit.Test;
     11import org.junit.jupiter.api.extension.RegisterExtension;
     12import org.junit.jupiter.api.Test;
    1313import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1414import org.openstreetmap.josm.data.osm.OsmUtils;
     
    2020 * Unit tests of {@link AutoFilterRule} class.
    2121 */
    22 public class AutoFilterRuleTest {
     22class AutoFilterRuleTest {
    2323
    2424    /**
    2525     * Setup tests
    2626     */
    27     @Rule
     27    @RegisterExtension
    2828    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2929    public JOSMTestRules test = new JOSMTestRules().i18n();
     
    3333     */
    3434    @Test
    35     public void testTagValuesForPrimitive() {
     35    void testTagValuesForPrimitive() {
    3636        // #17109, support values like 0.5 or 1.5 - level values are multiplied by 2 when parsing, values are divided by 2 for formatting
    3737        final AutoFilterRule level = AutoFilterRule.getDefaultRule("level").orElseThrow(NoSuchElementException::new);
     
    5252     */
    5353    @Test
    54     public void testTagValuesForPrimitiveInclineUnit() {
     54    void testTagValuesForPrimitiveInclineUnit() {
    5555        final AutoFilterRule incline = AutoFilterRule.getDefaultRule("incline").orElseThrow(NoSuchElementException::new);
    5656        assertTagValuesForPrimitive(incline, "way incline=up");
     
    6363     */
    6464    @Test
    65     public void testTagValuesForPrimitivesDefaults() {
     65    void testTagValuesForPrimitivesDefaults() {
    6666        final AutoFilterRule layer = AutoFilterRule.getDefaultRule("layer").orElseThrow(NoSuchElementException::new);
    6767        assertTagValuesForPrimitive(layer, "way foo=bar");
     
    8585     */
    8686    @Test
    87     public void testValueFormatter() {
     87    void testValueFormatter() {
    8888        final AutoFilterRule voltage = AutoFilterRule.getDefaultRule("voltage").orElseThrow(NoSuchElementException::new);
    8989        assertEquals("230V", voltage.formatValue(230));
Note: See TracChangeset for help on using the changeset viewer.