Search in sources :

Example 1 with PostAssetAdministrationShellRequest

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);
}
Also used : PostAssetAdministrationShellResponse(de.fraunhofer.iosb.ilt.faaast.service.model.api.response.PostAssetAdministrationShellResponse) PostAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAssetAdministrationShellRequest) Test(org.junit.Test)

Aggregations

PostAssetAdministrationShellResponse (de.fraunhofer.iosb.ilt.faaast.service.model.api.response.PostAssetAdministrationShellResponse)1 PostAssetAdministrationShellRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAssetAdministrationShellRequest)1 Test (org.junit.Test)1