use of com.forgerock.openbanking.model.Tpp in project openbanking-aspsp by OpenBankingToolkit.
the class TppRegistrationServiceTest method ensureTppOwnsOidcRegistration.
@Test
public void ensureTppOwnsOidcRegistration() throws OAuth2InvalidClientException {
// Given
String clientId = "ClientId";
String clientName = "Name";
String authorizationNumber = "PSDUK-FCA-12345";
Tpp tpp = TestHelperFunctions.getValidTpp(clientId, clientName);
tpp.setAuthorisationNumber(authorizationNumber);
// When
tppRegistrationService.ensureTppOwnsOidcRegistration(tpp, authorizationNumber);
// Then
}
use of com.forgerock.openbanking.model.Tpp in project openbanking-aspsp by OpenBankingToolkit.
the class TppRegistrationServiceTest method ensureTppOwnsOidcRegistration_ThrowsWhenNoMatch.
@Test
public void ensureTppOwnsOidcRegistration_ThrowsWhenNoMatch() throws OAuth2InvalidClientException {
// Given
String clientId = "ClientId";
String clientName = "Name";
String authorizationNumber = "PSDUK-FCA-12345";
Tpp tpp = TestHelperFunctions.getValidTpp(clientId, clientName);
tpp.setAuthorisationNumber(authorizationNumber);
// When
Exception e = catchThrowableOfType(() -> tppRegistrationService.ensureTppOwnsOidcRegistration(tpp, "PSDUK-FCA" + "-54321"), Exception.class);
// Then
assertThat(e).isNotNull();
assertThat(e).isInstanceOf(OAuth2InvalidClientException.class);
}
use of com.forgerock.openbanking.model.Tpp in project openbanking-aspsp by OpenBankingToolkit.
the class TppRegistrationServiceTest method getTpp_success.
@Test
public void getTpp_success() throws OAuth2InvalidClientException {
// Given
String clientId = "clientId";
when(tppStoreService.findByClientId(clientId)).thenReturn(Optional.of(TestHelperFunctions.getValidTpp(clientId, "tppName")));
// When
Tpp tpp = tppRegistrationService.getTpp(clientId);
// Then
assertThat(tpp).isNotNull();
assertThat(tpp.getClientId()).isEqualTo(clientId);
}
use of com.forgerock.openbanking.model.Tpp in project openbanking-aspsp by OpenBankingToolkit.
the class TransactionsApiControllerIT method setUp.
@Before
public void setUp() {
Unirest.config().setObjectMapper(new JacksonObjectMapper()).verifySsl(false);
tpp = new Tpp();
tpp.setClientId(CLIENT_ID);
tpp.setAuthorisationNumber(AUTHORISATION_NUMBER);
}
use of com.forgerock.openbanking.model.Tpp in project openbanking-aspsp by OpenBankingToolkit.
the class TransactionsApiControllerIT method setUp.
@Before
public void setUp() {
Unirest.config().setObjectMapper(new JacksonObjectMapper()).verifySsl(false);
tpp = new Tpp();
tpp.setClientId(CLIENT_ID);
tpp.setAuthorisationNumber(AUTHORISATION_NUMBER);
}
Aggregations