Skip to content

Commit

Permalink
JUnit no longer likes overloaded methods for methodsource
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Jul 29, 2022
1 parent 2503d9b commit f5a6358
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -143,7 +144,7 @@ void testEnsureAllConditionsTested() {
assertEquals(EnumSet.allOf(MapillaryURLWireMockErrors.Type.class), testedTypes, "Please test all error types");
}

static Stream<Arguments> testUpdateAuthorization() {
static Stream<Arguments> 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"),
Expand All @@ -157,7 +158,7 @@ static Stream<Arguments> testUpdateAuthorization() {
}

@ParameterizedTest
@MethodSource
@MethodSource("updateAuthorizationArgs")
void testUpdateAuthorization(Duration duration, String accessToken, String tokenType) {
MapillaryUser.reset();
assertAll("User should be reset", NOT_LOGGED_IN_CHECKS);
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit f5a6358

Please sign in to comment.