Search in sources :

Example 1 with GatewayAccountResourceDTO

use of uk.gov.pay.connector.gatewayaccount.model.GatewayAccountResourceDTO in project pay-connector by alphagov.

the class GatewayAccountServiceTest method shouldSearchGatewayAccounts.

@Test
public void shouldSearchGatewayAccounts() {
    GatewayAccountSearchParams gatewayAccountSearchParams = new GatewayAccountSearchParams();
    when(mockGatewayAccountDao.search(gatewayAccountSearchParams)).thenReturn(Arrays.asList(getMockGatewayAccountEntity1, getMockGatewayAccountEntity2));
    List<GatewayAccountResourceDTO> gatewayAccounts = gatewayAccountService.searchGatewayAccounts(gatewayAccountSearchParams);
    assertThat(gatewayAccounts, hasSize(2));
    assertThat(gatewayAccounts.get(0).getServiceName(), is("service one"));
    assertThat(gatewayAccounts.get(1).getServiceName(), is("service two"));
}
Also used : GatewayAccountResourceDTO(uk.gov.pay.connector.gatewayaccount.model.GatewayAccountResourceDTO) GatewayAccountSearchParams(uk.gov.pay.connector.gatewayaccount.model.GatewayAccountSearchParams) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 GatewayAccountResourceDTO (uk.gov.pay.connector.gatewayaccount.model.GatewayAccountResourceDTO)1 GatewayAccountSearchParams (uk.gov.pay.connector.gatewayaccount.model.GatewayAccountSearchParams)1