use of uk.gov.ida.hub.config.dto.MatchingServiceConfigEntityDataDto in project verify-hub by alphagov.
the class MatchingServiceResource method getMatchingServices.
@GET
@Timed
public Collection<MatchingServiceConfigEntityDataDto> getMatchingServices() {
Collection<MatchingServiceConfigEntityDataDto> matchingServices = new ArrayList<>();
for (TransactionConfigEntityData transactionConfigEntityData : transactionConfigEntityDataRepository.getAllData()) {
MatchingServiceConfigEntityData matchingServiceConfigEntityData = matchingServiceConfigEntityDataRepository.getData(transactionConfigEntityData.getMatchingServiceEntityId()).get();
matchingServices.add(new MatchingServiceConfigEntityDataDto(matchingServiceConfigEntityData.getEntityId(), matchingServiceConfigEntityData.getUri(), transactionConfigEntityData.getEntityId(), matchingServiceConfigEntityData.getHealthCheckEnabled(), matchingServiceConfigEntityData.getOnboarding(), matchingServiceConfigEntityData.getUserAccountCreationUri()));
}
return matchingServices;
}
use of uk.gov.ida.hub.config.dto.MatchingServiceConfigEntityDataDto in project verify-hub by alphagov.
the class MatchingServiceResourceIntegrationTest method getMatchingService_returnsMatchingServiceForEntityId.
@Test
public void getMatchingService_returnsMatchingServiceForEntityId() {
String entityId = ENTITY_ID;
URI uri = configAppRule.getUri(Urls.ConfigUrls.MATCHING_SERVICE_RESOURCE).buildFromEncoded(StringEncoding.urlEncode(entityId).replace("+", "%20"));
Response response = client.target(uri.toASCIIString()).request().get();
assertThat(response.getStatus()).isEqualTo(Response.Status.OK.getStatusCode());
MatchingServiceConfigEntityDataDto ms = response.readEntity(MatchingServiceConfigEntityDataDto.class);
assertThat(ms.getEntityId()).isEqualTo(entityId);
assertThat(ms.getUri().toString()).isEqualTo(MATCHING_URI);
}
Aggregations