Ignore:
Timestamp:
2020-10-28T22:46:55+01:00 (4 years ago)
Author:
Don-vip
Message:

see #16567 - fix obvious test errors + upgrade tests dependencies

File:
1 edited

Legend:

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

    r17275 r17276  
    1212import org.hamcrest.CoreMatchers;
    1313import org.hamcrest.Matcher;
    14 import org.junit.jupiter.api.Test;
    1514import org.junit.jupiter.api.extension.RegisterExtension;
    16 import org.junit.runner.RunWith;
    17 import org.junit.runners.Parameterized;
     15import org.junit.jupiter.params.ParameterizedTest;
     16import org.junit.jupiter.params.provider.MethodSource;
    1817import org.openstreetmap.josm.data.Bounds;
    1918import org.openstreetmap.josm.data.coor.LatLon;
     
    2524 * Tests the method {@link RenderingCLI#determineRenderingArea(org.openstreetmap.josm.data.osm.DataSet)}.
    2625 */
    27 @RunWith(Parameterized.class)
    2826class RenderingCLIAreaTest {
    2927    /**
     
    3432    public JOSMTestRules test = new JOSMTestRules().projection().territories();
    3533
    36     @Parameterized.Parameters
    3734    public static Collection<Object[]> runs() {
    3835        Collection<Object[]> runs = new ArrayList<>();
     
    149146    }
    150147
    151     private final String[] args;
    152     private final Matcher<Double> scaleMatcher;
    153     private final Matcher<Bounds> boundsMatcher;
    154 
    155     RenderingCLIAreaTest(String args, Matcher<Double> scaleMatcher, Matcher<Bounds> boundsMatcher) {
    156         this.args = args.split("\\s+", -1);
    157         this.scaleMatcher = scaleMatcher;
    158         this.boundsMatcher = boundsMatcher;
    159     }
    160 
    161     @Test
    162     void testDetermineRenderingArea() {
     148    @ParameterizedTest
     149    @MethodSource("runs")
     150    void testDetermineRenderingArea(String args, Matcher<Double> scaleMatcher, Matcher<Bounds> boundsMatcher) {
    163151        RenderingCLI cli = new RenderingCLI();
    164         cli.parseArguments(args);
     152        cli.parseArguments(args.split("\\s+", -1));
    165153        RenderingCLI.RenderingArea ra = cli.determineRenderingArea(null);
    166154        assertThat(ra.scale, scaleMatcher);
Note: See TracChangeset for help on using the changeset viewer.