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