Search in sources :

Example 1 with GetAllAssetAdministrationShellsByIdShortRequest

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

the class RequestHandlerManagerTest method testGetAllAssetAdministrationShellsByIdShortRequest.

@Test
public void testGetAllAssetAdministrationShellsByIdShortRequest() {
    when(persistence.get(eq("Test"), argThat((List<AssetIdentification> t) -> true), any())).thenReturn(environment.getAssetAdministrationShells());
    GetAllAssetAdministrationShellsByIdShortRequest request = new GetAllAssetAdministrationShellsByIdShortRequest.Builder().idShort("Test").build();
    GetAllAssetAdministrationShellsByIdShortResponse response = manager.execute(request);
    GetAllAssetAdministrationShellsByIdShortResponse expected = new GetAllAssetAdministrationShellsByIdShortResponse.Builder().payload(environment.getAssetAdministrationShells()).statusCode(StatusCode.Success).build();
    Assert.assertEquals(expected, response);
}
Also used : SpecificAssetIdentification(de.fraunhofer.iosb.ilt.faaast.service.model.asset.SpecificAssetIdentification) AssetIdentification(de.fraunhofer.iosb.ilt.faaast.service.model.asset.AssetIdentification) GlobalAssetIdentification(de.fraunhofer.iosb.ilt.faaast.service.model.asset.GlobalAssetIdentification) GetAllAssetAdministrationShellsByIdShortResponse(de.fraunhofer.iosb.ilt.faaast.service.model.api.response.GetAllAssetAdministrationShellsByIdShortResponse) GetAllAssetAdministrationShellsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByIdShortRequest) Test(org.junit.Test)

Aggregations

GetAllAssetAdministrationShellsByIdShortResponse (de.fraunhofer.iosb.ilt.faaast.service.model.api.response.GetAllAssetAdministrationShellsByIdShortResponse)1 AssetIdentification (de.fraunhofer.iosb.ilt.faaast.service.model.asset.AssetIdentification)1 GlobalAssetIdentification (de.fraunhofer.iosb.ilt.faaast.service.model.asset.GlobalAssetIdentification)1 SpecificAssetIdentification (de.fraunhofer.iosb.ilt.faaast.service.model.asset.SpecificAssetIdentification)1 GetAllAssetAdministrationShellsByIdShortRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByIdShortRequest)1 Test (org.junit.Test)1