use of io.adminshell.aas.v3.model.AssetAdministrationShell in project FAAAST-Service by FraunhoferIOSB.
the class IntegrationTestHttpEndpoint method testPutAssetInformationEvent.
@Test
public void testPutAssetInformationEvent() {
AssetAdministrationShell expected = environment.getAssetAdministrationShells().get(1);
expected.getAssetInformation().setAssetKind(AssetKind.TYPE);
String url = HTTP_SHELLS + "/" + Base64.getUrlEncoder().encodeToString(expected.getIdentification().getIdentifier().getBytes(StandardCharsets.UTF_8)) + "/aas/asset-information";
setUpEventCheck(expected, ElementUpdateEventMessage.class, () -> putCall(url, expected.getAssetInformation()));
}
use of io.adminshell.aas.v3.model.AssetAdministrationShell in project FAAAST-Service by FraunhoferIOSB.
the class IntegrationTestHttpEndpoint method call_GET_AASShell_Content.
private void call_GET_AASShell_Content(String content, Object expected, Class<?> expectedClass) throws IOException, DeserializationException {
AssetAdministrationShell aas = environment.getAssetAdministrationShells().get(1);
HttpResponse actual = getCall(HTTP_SHELLS + "/" + Base64.getUrlEncoder().encodeToString(aas.getIdentification().getIdentifier().getBytes(StandardCharsets.UTF_8)) + "/aas?content=" + content);
Assert.assertEquals(expected, retrieveResourceFromResponse(actual, expectedClass));
Assert.assertEquals(HttpStatus.SC_OK, actual.getStatusLine().getStatusCode());
}
Aggregations