use of io.nem.symbol.sdk.openapi.vertx.model.NetworkConfigurationDTO in project nem2-sdk-java by nemtech.
the class NetworkRepositoryVertxImplTest method getNetworkProperties.
@Test
void getNetworkProperties() throws Exception {
NetworkConfigurationDTO dto = TestHelperVertx.loadResource("network-configuration.json", NetworkConfigurationDTO.class);
Assertions.assertNotNull(dto);
ObjectNode plain = TestHelperVertx.loadResource("network-configuration.json", ObjectNode.class);
Assertions.assertNotNull(plain);
Assertions.assertEquals(jsonHelper.prettyPrint(dto), jsonHelper.prettyPrint(plain));
mockRemoteCall(dto);
NetworkConfiguration configuration = repository.getNetworkProperties().toFuture().get();
Assertions.assertNotNull(configuration);
Map sorted = TestHelperVertx.loadResource("network-configuration.json", Map.class);
Assertions.assertNotNull(sorted);
((Map) sorted.get("network")).put("nodeEqualityStrategy", "PUBLIC_KEY");
Assertions.assertEquals(jsonHelper.prettyPrint(sorted), jsonHelper.prettyPrint(configuration));
}
Aggregations