use of de.fraunhofer.iosb.ilt.faaast.service.dataformat.json.JsonSerializer in project FAAAST-Service by FraunhoferIOSB.
the class IntegrationTestHttpEndpoint method testGetSubmodelsWithSemanticId.
@Test
public void testGetSubmodelsWithSemanticId() throws SerializationException {
Submodel expected = environment.getSubmodels().get(1);
String semnaticId = Base64.getUrlEncoder().encodeToString(new JsonSerializer().write(expected.getSemanticId()).getBytes(StandardCharsets.UTF_8));
List<Submodel> actual = getListCall(HTTP_SUBMODELS + "?semanticId=" + semnaticId, Submodel.class);
Assert.assertEquals(List.of(expected), actual);
}
use of de.fraunhofer.iosb.ilt.faaast.service.dataformat.json.JsonSerializer in project FAAAST-Service by FraunhoferIOSB.
the class IntegrationTestHttpEndpoint method testGetSubmodelsEvent.
@Test
public void testGetSubmodelsEvent() throws SerializationException {
Submodel expected = environment.getSubmodels().get(1);
String semnaticId = Base64.getUrlEncoder().encodeToString(new JsonSerializer().write(expected.getSemanticId()).getBytes(StandardCharsets.UTF_8));
setUpEventCheck(expected, ElementReadEventMessage.class, () -> getListCall(HTTP_SUBMODELS + "?semanticId=" + semnaticId));
}
Aggregations