Search in sources :

Example 1 with PutAssetAdministrationShellByIdRequest

use of de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellByIdRequest in project FAAAST-Service by FraunhoferIOSB.

the class RequestHandlerManagerTest method testPutAssetAdministrationShellByIdRequest.

@Test
public void testPutAssetAdministrationShellByIdRequest() {
    when(persistence.put(environment.getAssetAdministrationShells().get(0))).thenReturn(environment.getAssetAdministrationShells().get(0));
    PutAssetAdministrationShellByIdRequest request = new PutAssetAdministrationShellByIdRequest.Builder().aas(environment.getAssetAdministrationShells().get(0)).build();
    PutAssetAdministrationShellByIdResponse response = manager.execute(request);
    PutAssetAdministrationShellByIdResponse expected = new PutAssetAdministrationShellByIdResponse.Builder().payload(environment.getAssetAdministrationShells().get(0)).statusCode(StatusCode.Success).build();
    Assert.assertEquals(expected, response);
}
Also used : PutAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellByIdRequest) PutAssetAdministrationShellByIdResponse(de.fraunhofer.iosb.ilt.faaast.service.model.api.response.PutAssetAdministrationShellByIdResponse) Test(org.junit.Test)

Aggregations

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