Skip to content

Commit f070c97

Browse files
committed
CWMS-2386 - removed url accessor from mock since the parent has an accessor
1 parent a22bfc8 commit f070c97

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

cwbi-auth-http-client/src/test/java/hec/army/usace/hec/cwbi/auth/http/client/MockCwbiAuthTokenProvider.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
public class MockCwbiAuthTokenProvider extends OidcAuthTokenProvider {
3131

3232
private final SSLSocketFactory sslSocketFactory;
33-
private final ApiConnectionInfo url;
3433

3534
/**
3635
* Provider for OAuth2Tokens.
@@ -41,15 +40,9 @@ public class MockCwbiAuthTokenProvider extends OidcAuthTokenProvider {
4140
*/
4241
public MockCwbiAuthTokenProvider(ApiConnectionInfo url, String clientId, SSLSocketFactory sslSocketFactory) {
4342
super(clientId, url);
44-
this.url = Objects.requireNonNull(url, "Missing required url");
4543
this.sslSocketFactory = Objects.requireNonNull(sslSocketFactory, "Missing required sslSocketFactory");
4644
}
4745

48-
//package scoped for testing
49-
ApiConnectionInfo getUrl() {
50-
return url;
51-
}
52-
5346
//package scoped for testing
5447
SSLSocketFactory getSslSocketFactory() {
5548
return sslSocketFactory;

cwbi-auth-http-client/src/test/java/hec/army/usace/hec/cwbi/auth/http/client/TestCwbiTokenProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void testConstructor() throws IOException {
210210
ApiConnectionInfo url = buildConnectionInfo();
211211
SSLSocketFactory sslSocketFactory = getTestSslSocketFactory();
212212
MockCwbiAuthTokenProvider tokenProvider = new MockCwbiAuthTokenProvider(url, "clientId", sslSocketFactory);
213-
assertEquals(url.getApiRoot(), tokenProvider.getUrl().getApiRoot());
213+
assertEquals(url.getApiRoot(), tokenProvider.getWellKnownUrl().getApiRoot());
214214
assertEquals("clientId", tokenProvider.getClientId());
215215
assertEquals(sslSocketFactory, tokenProvider.getSslSocketFactory());
216216
}

0 commit comments

Comments
 (0)