Search in sources :

Example 6 with OBVersion

use of com.forgerock.openbanking.common.model.version.OBVersion in project openbanking-aspsp by OpenBankingToolkit.

the class ApiVersionMatcherTest method shouldGetVersionGiven3_1_5.

@Test
public void shouldGetVersionGiven3_1_5() {
    // Given
    String requestUri = "v3.1.5";
    // When
    OBVersion version = ApiVersionUtils.getOBVersion(requestUri);
    // Then
    assertThat(version).isEqualTo(OBVersion.v3_1_5);
}
Also used : OBVersion(com.forgerock.openbanking.common.model.version.OBVersion) Test(org.junit.Test)

Example 7 with OBVersion

use of com.forgerock.openbanking.common.model.version.OBVersion in project openbanking-aspsp by OpenBankingToolkit.

the class ApiVersionMatcherTest method shouldGetVersionGiven3_0.

@Test
public void shouldGetVersionGiven3_0() {
    // Given
    String requestUri = "/open-banking/v3.0/pisp";
    // When
    OBVersion version = ApiVersionUtils.getOBVersion(requestUri);
    // Then
    assertThat(version).isEqualTo(OBVersion.v3_0);
}
Also used : OBVersion(com.forgerock.openbanking.common.model.version.OBVersion) Test(org.junit.Test)

Aggregations

OBVersion (com.forgerock.openbanking.common.model.version.OBVersion)7 Test (org.junit.Test)4 RSEndpointWrapperService (com.forgerock.openbanking.aspsp.rs.wrappper.RSEndpointWrapperService)2 OpenBankingHttpHeaders (com.forgerock.openbanking.common.constants.OpenBankingHttpHeaders)2 RsStoreGateway (com.forgerock.openbanking.common.services.store.RsStoreGateway)2 OBErrorResponseException (com.forgerock.openbanking.exceptions.OBErrorResponseException)2 Principal (java.security.Principal)2 Collections (java.util.Collections)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)2 Slf4j (lombok.extern.slf4j.Slf4j)2 Autowired (org.springframework.beans.factory.annotation.Autowired)2 HttpHeaders (org.springframework.http.HttpHeaders)2 HttpStatus (org.springframework.http.HttpStatus)2 ResponseEntity (org.springframework.http.ResponseEntity)2 Controller (org.springframework.stereotype.Controller)2 StringUtils (org.springframework.util.StringUtils)2 OBDomesticVRPConsentRequest (uk.org.openbanking.datamodel.vrp.OBDomesticVRPConsentRequest)2 OBDomesticVRPConsentResponse (uk.org.openbanking.datamodel.vrp.OBDomesticVRPConsentResponse)2 OBVRPFundsConfirmationRequest (uk.org.openbanking.datamodel.vrp.OBVRPFundsConfirmationRequest)2 OBVRPFundsConfirmationResponse (uk.org.openbanking.datamodel.vrp.OBVRPFundsConfirmationResponse)2