Skip to content

Commit f1fc9ef

Browse files
authored
removed depricated code, fixed tests (#575)
1 parent 32bbbc8 commit f1fc9ef

File tree

45 files changed

+79
-535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+79
-535
lines changed

adapters/adorsys-adapter/src/main/java/de/adorsys/xs2a/adapter/adorsys/AdorsysIntegServiceProvider.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2018 adorsys GmbH & Co KG
2+
* Copyright 2018-2021 adorsys GmbH & Co KG
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,14 +35,6 @@ public class AdorsysIntegServiceProvider extends AbstractAdapterServiceProvider
3535

3636
private final OauthHeaderInterceptor oauthHeaderInterceptor = new OauthHeaderInterceptor();
3737

38-
@Override
39-
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
40-
HttpClientFactory httpClientFactory,
41-
Pkcs12KeyStore keyStore,
42-
LinksRewriter linksRewriter) {
43-
return getPaymentInitiationService(aspsp, httpClientFactory, linksRewriter);
44-
}
45-
4638
@Override
4739
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
4840
HttpClientFactory httpClientFactory,
@@ -65,14 +57,6 @@ private Interceptor[] getInterceptors(Pkcs12KeyStore keyStore) {
6557
return interceptors.toArray(new Interceptor[0]);
6658
}
6759

68-
@Override
69-
public AccountInformationService getAccountInformationService(Aspsp aspsp,
70-
HttpClientFactory httpClientFactory,
71-
Pkcs12KeyStore keyStore,
72-
LinksRewriter linksRewriter) {
73-
return getAccountInformationService(aspsp, httpClientFactory, linksRewriter);
74-
}
75-
7660
@Override
7761
public AccountInformationService getAccountInformationService(Aspsp aspsp,
7862
HttpClientFactory httpClientFactory,
@@ -84,11 +68,6 @@ public AccountInformationService getAccountInformationService(Aspsp aspsp,
8468
linksRewriter);
8569
}
8670

87-
@Override
88-
public Oauth2Service getOauth2Service(Aspsp aspsp, HttpClientFactory httpClientFactory, Pkcs12KeyStore keyStore) {
89-
return getOauth2Service(aspsp, httpClientFactory);
90-
}
91-
9271
@Override
9372
public Oauth2Service getOauth2Service(Aspsp aspsp, HttpClientFactory httpClientFactory) {
9473
HttpClient httpClient = httpClientFactory.getHttpClient(getAdapterId());

adapters/adorsys-adapter/src/test/java/de/adorsys/xs2a/adapter/adorsys/AdorsysIntegServiceProviderTest.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ void getPaymentInitiationService() {
3333
= provider.getPaymentInitiationService(aspsp, httpClientFactory, null);
3434

3535
assertThat(actualService)
36-
.isNotNull()
37-
.isInstanceOf(BasePaymentInitiationService.class);
36+
.isExactlyInstanceOf(BasePaymentInitiationService.class);
3837
}
3938

4039
@Test
@@ -43,8 +42,7 @@ void getAccountInformationService() {
4342
= provider.getAccountInformationService(aspsp, httpClientFactory, null);
4443

4544
assertThat(actualService)
46-
.isNotNull()
47-
.isInstanceOf(AdorsysAccountInformationService.class);
45+
.isExactlyInstanceOf(AdorsysAccountInformationService.class);
4846
}
4947

5048
@Test
@@ -53,7 +51,6 @@ void getOauth2Service() {
5351
= provider.getOauth2Service(aspsp, httpClientFactory);
5452

5553
assertThat(actualService)
56-
.isNotNull()
57-
.isInstanceOf(AdorsysIntegOauth2Service.class);
54+
.isExactlyInstanceOf(AdorsysIntegOauth2Service.class);
5855
}
5956
}

adapters/comdirect-adapter/src/main/java/de/adorsys/xs2a/adapter/comdirect/ComdirectServiceProvider.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2018 adorsys GmbH & Co KG
2+
* Copyright 2018-2021 adorsys GmbH & Co KG
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,14 +25,6 @@
2525

2626
public class ComdirectServiceProvider extends AbstractAdapterServiceProvider implements Oauth2ServiceProvider {
2727

28-
@Override
29-
public AccountInformationService getAccountInformationService(Aspsp aspsp,
30-
HttpClientFactory httpClientFactory,
31-
Pkcs12KeyStore keyStore,
32-
LinksRewriter linksRewriter) {
33-
return getAccountInformationService(aspsp, httpClientFactory, linksRewriter);
34-
}
35-
3628
@Override
3729
public AccountInformationService getAccountInformationService(Aspsp aspsp,
3830
HttpClientFactory httpClientFactory,
@@ -42,14 +34,6 @@ public AccountInformationService getAccountInformationService(Aspsp aspsp,
4234
linksRewriter);
4335
}
4436

45-
@Override
46-
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
47-
HttpClientFactory httpClientFactory,
48-
Pkcs12KeyStore keyStore,
49-
LinksRewriter linksRewriter) {
50-
return getPaymentInitiationService(aspsp, httpClientFactory, linksRewriter);
51-
}
52-
5337
@Override
5438
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
5539
HttpClientFactory httpClientFactory,
@@ -65,11 +49,6 @@ public String getAdapterId() {
6549
return "comdirect-adapter";
6650
}
6751

68-
@Override
69-
public Oauth2Service getOauth2Service(Aspsp aspsp, HttpClientFactory httpClientFactory, Pkcs12KeyStore keyStore) {
70-
return getOauth2Service(aspsp, httpClientFactory);
71-
}
72-
7352
@Override
7453
public Oauth2Service getOauth2Service(Aspsp aspsp, HttpClientFactory httpClientFactory) {
7554
return ComdirectOauth2Service.create(aspsp, httpClientFactory);

adapters/comdirect-adapter/src/test/java/de/adorsys/xs2a/adapter/comdirect/ComdirectServiceProviderTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void getAccountInformationService() {
3333
= serviceProvider.getAccountInformationService(aspsp, httpClientFactory, null);
3434

3535
assertThat(actualService)
36-
.isInstanceOf(ComdirectAccountInformationService.class);
36+
.isExactlyInstanceOf(ComdirectAccountInformationService.class);
3737
}
3838

3939
@Test
@@ -42,7 +42,7 @@ void getPaymentInitiationService() {
4242
= serviceProvider.getPaymentInitiationService(aspsp, httpClientFactory, null);
4343

4444
assertThat(actualService)
45-
.isInstanceOf(BasePaymentInitiationService.class);
45+
.isExactlyInstanceOf(BasePaymentInitiationService.class);
4646
}
4747

4848
@Test
@@ -51,6 +51,6 @@ void getOauth2Service() {
5151
= serviceProvider.getOauth2Service(aspsp, httpClientFactory);
5252

5353
assertThat(actualService)
54-
.isInstanceOf(ComdirectOauth2Service.class);
54+
.isExactlyInstanceOf(ComdirectOauth2Service.class);
5555
}
5656
}

adapters/commerzbank-adapter/src/main/java/de/adorsys/xs2a/adapter/commerzbank/CommerzbankServiceProvider.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2018 adorsys GmbH & Co KG
2+
* Copyright 2018-2021 adorsys GmbH & Co KG
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,14 +25,6 @@
2525

2626
public class CommerzbankServiceProvider extends AbstractAdapterServiceProvider implements Oauth2ServiceProvider {
2727

28-
@Override
29-
public AccountInformationService getAccountInformationService(Aspsp aspsp,
30-
HttpClientFactory httpClientFactory,
31-
Pkcs12KeyStore keyStore,
32-
LinksRewriter linksRewriter) {
33-
return getAccountInformationService(aspsp, httpClientFactory, linksRewriter);
34-
}
35-
3628
@Override
3729
public AccountInformationService getAccountInformationService(Aspsp aspsp,
3830
HttpClientFactory httpClientFactory,
@@ -42,14 +34,6 @@ public AccountInformationService getAccountInformationService(Aspsp aspsp,
4234
linksRewriter);
4335
}
4436

45-
@Override
46-
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
47-
HttpClientFactory httpClientFactory,
48-
Pkcs12KeyStore keyStore,
49-
LinksRewriter linksRewriter) {
50-
return getPaymentInitiationService(aspsp, httpClientFactory, linksRewriter);
51-
}
52-
5337
@Override
5438
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
5539
HttpClientFactory httpClientFactory,
@@ -65,11 +49,6 @@ public String getAdapterId() {
6549
return "commerzbank-adapter";
6650
}
6751

68-
@Override
69-
public Oauth2Service getOauth2Service(Aspsp aspsp, HttpClientFactory httpClientFactory, Pkcs12KeyStore keyStore) {
70-
return getOauth2Service(aspsp, httpClientFactory);
71-
}
72-
7352
@Override
7453
public Oauth2Service getOauth2Service(Aspsp aspsp,
7554
HttpClientFactory httpClientFactory) {

adapters/commerzbank-adapter/src/test/java/de/adorsys/xs2a/adapter/commerzbank/CommerzbankServiceProviderTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.junit.jupiter.api.Test;
1212

1313
import static org.assertj.core.api.Assertions.assertThat;
14-
import static org.junit.jupiter.api.Assertions.*;
1514
import static org.mockito.Mockito.mock;
1615
import static org.mockito.Mockito.when;
1716

@@ -34,7 +33,7 @@ void getAccountInformationService() {
3433
= serviceProvider.getAccountInformationService(aspsp, httpClientFactory, null);
3534

3635
assertThat(actualService)
37-
.isInstanceOf(CommerzbankAccountInformationService.class);
36+
.isExactlyInstanceOf(CommerzbankAccountInformationService.class);
3837
}
3938

4039
@Test
@@ -43,7 +42,7 @@ void getPaymentInitiationService() {
4342
= serviceProvider.getPaymentInitiationService(aspsp, httpClientFactory, null);
4443

4544
assertThat(actualService)
46-
.isInstanceOf(BasePaymentInitiationService.class);
45+
.isExactlyInstanceOf(BasePaymentInitiationService.class);
4746
}
4847

4948
@Test
@@ -52,6 +51,6 @@ void getOauth2Service() {
5251
= serviceProvider.getOauth2Service(aspsp, httpClientFactory);
5352

5453
assertThat(actualService)
55-
.isInstanceOf(CommerzbankOauth2Service.class);
54+
.isExactlyInstanceOf(CommerzbankOauth2Service.class);
5655
}
5756
}

adapters/consors-bank-adapter/src/main/java/de/adorsys/xs2a/adapter/consors/ConsorsServiceProvider.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2018 adorsys GmbH & Co KG
2+
* Copyright 2018-2021 adorsys GmbH & Co KG
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,14 +25,6 @@
2525
public class ConsorsServiceProvider extends AbstractAdapterServiceProvider {
2626
private final PsuIdHeaderInterceptor psuIdHeaderInterceptor = new PsuIdHeaderInterceptor();
2727

28-
@Override
29-
public AccountInformationService getAccountInformationService(Aspsp aspsp,
30-
HttpClientFactory httpClientFactory,
31-
Pkcs12KeyStore keyStore,
32-
LinksRewriter linksRewriter) {
33-
return getAccountInformationService(aspsp, httpClientFactory, linksRewriter);
34-
}
35-
3628
@Override
3729
public AccountInformationService getAccountInformationService(Aspsp aspsp,
3830
HttpClientFactory httpClientFactory,
@@ -43,14 +35,6 @@ public AccountInformationService getAccountInformationService(Aspsp aspsp,
4335
linksRewriter);
4436
}
4537

46-
@Override
47-
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
48-
HttpClientFactory httpClientFactory,
49-
Pkcs12KeyStore keyStore,
50-
LinksRewriter linksRewriter) {
51-
return getPaymentInitiationService(aspsp, httpClientFactory, linksRewriter);
52-
}
53-
5438
@Override
5539
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
5640
HttpClientFactory httpClientFactory,

adapters/consors-bank-adapter/src/test/java/de/adorsys/xs2a/adapter/consors/ConsorsServiceProviderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void getAccountInformationService() {
3131
= serviceProvider.getAccountInformationService(aspsp, httpClientFactory, null);
3232

3333
assertThat(actualService)
34-
.isInstanceOf(ConsorsAccountInformationService.class);
34+
.isExactlyInstanceOf(ConsorsAccountInformationService.class);
3535
}
3636

3737
@Test
@@ -40,6 +40,6 @@ void getPaymentInitiationService() {
4040
= serviceProvider.getPaymentInitiationService(aspsp, httpClientFactory, null);
4141

4242
assertThat(actualService)
43-
.isInstanceOf(ConsorsPaymentInitiationService.class);
43+
.isExactlyInstanceOf(ConsorsPaymentInitiationService.class);
4444
}
4545
}

adapters/crealogix-adapter/src/main/java/de/adorsys/xs2a/adapter/crealogix/DkbServiceProvider.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2020 adorsys GmbH & Co KG
2+
* Copyright 2018-2021 adorsys GmbH & Co KG
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,14 +24,6 @@
2424

2525
public class DkbServiceProvider extends AbstractAdapterServiceProvider implements EmbeddedPreAuthorisationServiceProvider {
2626

27-
@Override
28-
public AccountInformationService getAccountInformationService(Aspsp aspsp,
29-
HttpClientFactory httpClientFactory,
30-
Pkcs12KeyStore keyStore,
31-
LinksRewriter linksRewriter) {
32-
return getAccountInformationService(aspsp, httpClientFactory, linksRewriter);
33-
}
34-
3527
@Override
3628
public AccountInformationService getAccountInformationService(Aspsp aspsp,
3729
HttpClientFactory httpClientFactory,
@@ -41,14 +33,6 @@ public AccountInformationService getAccountInformationService(Aspsp aspsp,
4133
linksRewriter);
4234
}
4335

44-
@Override
45-
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
46-
HttpClientFactory httpClientFactory,
47-
Pkcs12KeyStore keyStore,
48-
LinksRewriter linksRewriter) {
49-
return getPaymentInitiationService(aspsp, httpClientFactory, linksRewriter);
50-
}
51-
5236
@Override
5337
public PaymentInitiationService getPaymentInitiationService(Aspsp aspsp,
5438
HttpClientFactory httpClientFactory,

adapters/crealogix-adapter/src/test/java/de/adorsys/xs2a/adapter/crealogix/CrealogixServiceProviderTest.java

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)