Search in sources :

Example 1 with PostConceptDescriptionRequest

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

the class RequestHandlerManagerTest method testPostConceptDescriptionRequest.

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

Aggregations

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