Search in sources :

Example 1 with FRDomesticVRPRequestData

use of com.forgerock.openbanking.common.model.openbanking.persistence.vrp.FRDomesticVRPRequestData in project openbanking-aspsp by OpenBankingToolkit.

the class FRDomesticVRPConvertersTest method success_toFRDomesticVRPRequest.

@Test
public void success_toFRDomesticVRPRequest() {
    // Given
    OBDomesticVRPRequest obDomesticVRPPaymentRequest = getOBDomesticVRPRequest();
    // When
    FRDomesticVRPRequest frDomesticVRPRequest = FRDomesticVRPConverters.toFRDomesticVRPRequest(obDomesticVRPPaymentRequest);
    // Then
    assertThat(frDomesticVRPRequest).isNotNull();
    assertThat(frDomesticVRPRequest.getData()).isNotNull();
    FRDomesticVRPRequestData frRequestData = frDomesticVRPRequest.getData();
    OBDomesticVRPRequestData obRequestData = obDomesticVRPPaymentRequest.getData();
    assertThat(frRequestData.getConsentId()).isNotNull();
    assertThat(frRequestData.getConsentId()).isEqualTo(obRequestData.getConsentId());
    assertThat(frRequestData.getPsuAuthenticationMethod()).isNotNull();
    assertThat(frRequestData.getPsuAuthenticationMethod()).isEqualTo(obRequestData.getPsUAuthenticationMethod());
    assertThat(frRequestData.getInitiation()).isNotNull();
    assertThat(frRequestData.getInstruction()).isNotNull();
}
Also used : OBDomesticVRPRequest(uk.org.openbanking.datamodel.vrp.OBDomesticVRPRequest) FRDomesticVRPRequest(com.forgerock.openbanking.common.model.openbanking.persistence.vrp.FRDomesticVRPRequest) FRDomesticVRPRequestData(com.forgerock.openbanking.common.model.openbanking.persistence.vrp.FRDomesticVRPRequestData) OBDomesticVRPRequestData(uk.org.openbanking.datamodel.vrp.OBDomesticVRPRequestData) Test(org.junit.Test)

Aggregations

FRDomesticVRPRequest (com.forgerock.openbanking.common.model.openbanking.persistence.vrp.FRDomesticVRPRequest)1 FRDomesticVRPRequestData (com.forgerock.openbanking.common.model.openbanking.persistence.vrp.FRDomesticVRPRequestData)1 Test (org.junit.Test)1 OBDomesticVRPRequest (uk.org.openbanking.datamodel.vrp.OBDomesticVRPRequest)1 OBDomesticVRPRequestData (uk.org.openbanking.datamodel.vrp.OBDomesticVRPRequestData)1