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