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"));
}
Aggregations