use of de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAssetAdministrationShellRequest in project FAAAST-Service by FraunhoferIOSB.
the class RequestHandlerManagerTest method testPostAssetAdministrationShellRequest.
@Test
public void testPostAssetAdministrationShellRequest() {
when(persistence.put(environment.getAssetAdministrationShells().get(0))).thenReturn(environment.getAssetAdministrationShells().get(0));
PostAssetAdministrationShellRequest request = new PostAssetAdministrationShellRequest.Builder().aas(environment.getAssetAdministrationShells().get(0)).build();
PostAssetAdministrationShellResponse response = manager.execute(request);
PostAssetAdministrationShellResponse expected = new PostAssetAdministrationShellResponse.Builder().payload(environment.getAssetAdministrationShells().get(0)).statusCode(StatusCode.SuccessCreated).build();
Assert.assertEquals(expected, response);
}
Aggregations