Search in sources :

Example 21 with FREventNotification

use of com.forgerock.openbanking.common.model.openbanking.persistence.event.FREventNotification in project openbanking-aspsp by OpenBankingToolkit.

the class SignedJwtEventBuilderTest method buildClaimsForInternationalScheduledPayment_validJwtClaimsBuilt.

@Test
public void buildClaimsForInternationalScheduledPayment_validJwtClaimsBuilt() {
    // Given
    EventSubject subject = getEventSubject("PISC_123", "v3.1", "international-scheduled-payment");
    // When
    FREventNotification eventNotification = signedJwtEventBuilder.build(TPP, subject, EventType.RESOURCE_UPDATE_EVENT);
    // Then
    assertThat(eventNotification.getSignedJwt()).isEqualTo(FAKE_SIGNED_JWT);
    areClaimsValidForConsentId(subject.getId(), "/v3.1/international-scheduled-payments", "international-scheduled-payment", "v3.1");
}
Also used : FREventNotification(com.forgerock.openbanking.common.model.openbanking.persistence.event.FREventNotification) EventSubject(com.forgerock.openbanking.common.services.notification.EventSubject) Test(org.junit.Test)

Aggregations

FREventNotification (com.forgerock.openbanking.common.model.openbanking.persistence.event.FREventNotification)21 Test (org.junit.Test)17 EventSubject (com.forgerock.openbanking.common.services.notification.EventSubject)8 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)7 SpringSecForTest (com.forgerock.openbanking.integration.test.support.SpringSecForTest)6 OBEventPolling1 (uk.org.openbanking.datamodel.event.OBEventPolling1)6 OBEventPollingResponse1 (uk.org.openbanking.datamodel.event.OBEventPollingResponse1)6 FREventPolling (com.forgerock.openbanking.common.model.openbanking.domain.event.FREventPolling)3 FRDataEvent (com.forgerock.openbanking.common.model.data.FRDataEvent)2 FREventSubscription (com.forgerock.openbanking.common.model.openbanking.persistence.event.FREventSubscription)2 OBErrorException (com.forgerock.openbanking.exceptions.OBErrorException)2 Slf4j (lombok.extern.slf4j.Slf4j)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 AMOpenBankingConfiguration (com.forgerock.openbanking.am.config.AMOpenBankingConfiguration)1 CallBackCounterEntry (com.forgerock.openbanking.analytics.model.entries.callback.CallBackCounterEntry)1 CallBackResponseStatus (com.forgerock.openbanking.analytics.model.entries.callback.CallBackResponseStatus)1 CallBackCountersKPIService (com.forgerock.openbanking.analytics.services.CallBackCountersKPIService)1 AggregatedPollingService (com.forgerock.openbanking.aspsp.rs.simulator.event.store.AggregatedPollingService)1 CallbackUrlsService (com.forgerock.openbanking.aspsp.rs.simulator.event.store.CallbackUrlsService)1