Search in sources :

Example 1 with PutConceptDescriptionByIdRequest

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

the class RequestHandlerManagerTest method testPutConceptDescriptionByIdRequest.

@Test
public void testPutConceptDescriptionByIdRequest() throws ResourceNotFoundException {
    when(persistence.put(environment.getConceptDescriptions().get(0))).thenReturn(environment.getConceptDescriptions().get(0));
    PutConceptDescriptionByIdRequest request = new PutConceptDescriptionByIdRequest.Builder().conceptDescription(environment.getConceptDescriptions().get(0)).build();
    PutConceptDescriptionByIdResponse response = manager.execute(request);
    PutConceptDescriptionByIdResponse expected = new PutConceptDescriptionByIdResponse.Builder().payload(environment.getConceptDescriptions().get(0)).statusCode(StatusCode.Success).build();
    Assert.assertEquals(expected, response);
}
Also used : PutConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutConceptDescriptionByIdRequest) PutConceptDescriptionByIdResponse(de.fraunhofer.iosb.ilt.faaast.service.model.api.response.PutConceptDescriptionByIdResponse) Test(org.junit.Test)

Aggregations

PutConceptDescriptionByIdResponse (de.fraunhofer.iosb.ilt.faaast.service.model.api.response.PutConceptDescriptionByIdResponse)1 PutConceptDescriptionByIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.PutConceptDescriptionByIdRequest)1 Test (org.junit.Test)1