Search in sources :

Example 1 with GetAllConceptDescriptionsByIdShortRequest

use of de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest in project FAAAST-Service by FraunhoferIOSB.

the class RequestHandlerManagerTest method testGetAllConceptDescriptionsByIdShortRequest.

@Test
public void testGetAllConceptDescriptionsByIdShortRequest() throws ResourceNotFoundException {
    when(persistence.get(environment.getConceptDescriptions().get(0).getIdShort(), null, null, new OutputModifier())).thenReturn(environment.getConceptDescriptions());
    GetAllConceptDescriptionsByIdShortRequest request = new GetAllConceptDescriptionsByIdShortRequest.Builder().outputModifier(new OutputModifier()).idShort(environment.getConceptDescriptions().get(0).getIdShort()).build();
    GetAllConceptDescriptionsByIdShortResponse response = manager.execute(request);
    GetAllConceptDescriptionsByIdShortResponse expected = new GetAllConceptDescriptionsByIdShortResponse.Builder().payload(environment.getConceptDescriptions()).statusCode(StatusCode.Success).build();
    Assert.assertEquals(expected, response);
}
Also used : GetAllConceptDescriptionsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest) OutputModifier(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier) GetAllConceptDescriptionsByIdShortResponse(de.fraunhofer.iosb.ilt.faaast.service.model.api.response.GetAllConceptDescriptionsByIdShortResponse) Test(org.junit.Test)

Aggregations

OutputModifier (de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier)1 GetAllConceptDescriptionsByIdShortResponse (de.fraunhofer.iosb.ilt.faaast.service.model.api.response.GetAllConceptDescriptionsByIdShortResponse)1 GetAllConceptDescriptionsByIdShortRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest)1 Test (org.junit.Test)1