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);
}
Aggregations