From f5a635886c15480d120de0c2a481c5564aeeff47 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Fri, 29 Jul 2022 07:55:48 -0600 Subject: [PATCH] JUnit no longer likes overloaded methods for methodsource Signed-off-by: Taylor Smock --- .../josm/plugins/mapillary/oauth/OAuthUtilsTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/unit/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtilsTest.java b/test/unit/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtilsTest.java index 84618a57b..b0c05eb07 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtilsTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtilsTest.java @@ -1,3 +1,4 @@ +// License: GPL. For details, see LICENSE file. package org.openstreetmap.josm.plugins.mapillary.oauth; import static org.junit.jupiter.api.Assertions.assertAll; @@ -143,7 +144,7 @@ void testEnsureAllConditionsTested() { assertEquals(EnumSet.allOf(MapillaryURLWireMockErrors.Type.class), testedTypes, "Please test all error types"); } - static Stream testUpdateAuthorization() { + static Stream updateAuthorizationArgs() { return Stream.of(Arguments.of(Duration.ofMinutes(1), "test_token", "bearer"), Arguments.of(Duration.ofMinutes(30), "test_token_30_min", "bearer"), Arguments.of(Duration.ofHours(2), "test_token_2_hour", "bearer"), @@ -157,7 +158,7 @@ static Stream testUpdateAuthorization() { } @ParameterizedTest - @MethodSource + @MethodSource("updateAuthorizationArgs") void testUpdateAuthorization(Duration duration, String accessToken, String tokenType) { MapillaryUser.reset(); assertAll("User should be reset", NOT_LOGGED_IN_CHECKS); @@ -202,7 +203,7 @@ void testUpdateAuthorization(Duration duration, String accessToken, String token } @ParameterizedTest - @MethodSource("testUpdateAuthorization") + @MethodSource("updateAuthorizationArgs") void testUpdateAuthorizationBadResponse(Duration duration, String accessToken, String tokenType) { final NotificationMocker notificationMocker = new NotificationMocker();