Search in sources :

Example 1 with DeleteSubmodelReferenceRequest

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

the class RequestHandlerManagerTest method testDeleteSubmodelReferenceRequest.

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

Aggregations

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