Search in sources :

Example 1 with DeleteConceptDescriptionByIdRequest

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

the class RequestHandlerManagerTest method testDeleteConceptDescriptionByIdRequest.

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

Aggregations

QueryModifier (de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.QueryModifier)1 DeleteConceptDescriptionByIdResponse (de.fraunhofer.iosb.ilt.faaast.service.model.api.response.DeleteConceptDescriptionByIdResponse)1 DeleteConceptDescriptionByIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteConceptDescriptionByIdRequest)1 Test (org.junit.Test)1