Search in sources :

Example 1 with GetConceptDescriptionByIdRequest

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

the class RequestHandlerManagerTest method testGetConceptDescriptionByIdRequest.

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

Aggregations

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