Search in sources :

Example 1 with PutAssetAdministrationShellRequest

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

Aggregations

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