use of de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellRequest in project FAAAST-Service by FraunhoferIOSB.
the class RequestHandlerManagerTest method testPutAssetAdministrationShellRequest.
@Test
public void testPutAssetAdministrationShellRequest() throws ResourceNotFoundException {
// @TODO: open/unclear
// expected Identifiable
when(persistence.put(environment.getAssetAdministrationShells().get(0))).thenReturn(environment.getAssetAdministrationShells().get(0));
PutAssetAdministrationShellRequest request = new PutAssetAdministrationShellRequest.Builder().aas(environment.getAssetAdministrationShells().get(0)).id(AAS.getIdentification()).build();
PutAssetAdministrationShellResponse response = manager.execute(request);
PutAssetAdministrationShellResponse expected = new PutAssetAdministrationShellResponse.Builder().payload(environment.getAssetAdministrationShells().get(0)).statusCode(StatusCode.Success).build();
Assert.assertEquals(expected, response);
}
Aggregations