use of de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAssetAdministrationShellByIdRequest in project FAAAST-Service by FraunhoferIOSB.
the class RequestHandlerManagerTest method testDeleteAssetAdministrationShellByIdRequest.
@Test
public void testDeleteAssetAdministrationShellByIdRequest() throws ResourceNotFoundException {
when(persistence.get(environment.getAssetAdministrationShells().get(0).getIdentification(), new QueryModifier())).thenReturn(environment.getAssetAdministrationShells().get(0));
DeleteAssetAdministrationShellByIdRequest request = new DeleteAssetAdministrationShellByIdRequest().builder().id(environment.getAssetAdministrationShells().get(0).getIdentification()).build();
DeleteAssetAdministrationShellByIdResponse response = manager.execute(request);
DeleteAssetAdministrationShellByIdResponse expected = new DeleteAssetAdministrationShellByIdResponse.Builder().statusCode(StatusCode.Success).build();
Assert.assertEquals(expected, response);
verify(persistence).remove(environment.getAssetAdministrationShells().get(0).getIdentification());
}
Aggregations