Search in sources :

Example 1 with NetworkInfo

use of io.nem.symbol.sdk.model.network.NetworkInfo in project nem2-sdk-java by nemtech.

the class NetworkRepositoryIntegrationTest method getNetworkInfo.

@ParameterizedTest
@EnumSource(RepositoryType.class)
void getNetworkInfo(RepositoryType type) {
    NetworkInfo networkInfo = get(getNetworkRepository(type).getNetworkInfo());
    assertEquals(getNetworkType().getNetworkName(), networkInfo.getName());
    Assertions.assertNotNull(networkInfo.getDescription());
}
Also used : NetworkInfo(io.nem.symbol.sdk.model.network.NetworkInfo) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 2 with NetworkInfo

use of io.nem.symbol.sdk.model.network.NetworkInfo in project nem2-sdk-java by nemtech.

the class NetworkRepositoryVertxImplTest method shouldGetNetworkInfo.

@Test
void shouldGetNetworkInfo() throws Exception {
    NetworkTypeDTO networkTypeDTO = new NetworkTypeDTO();
    networkTypeDTO.setName("mijinTest");
    networkTypeDTO.setDescription("some description");
    mockRemoteCall(networkTypeDTO);
    NetworkInfo info = repository.getNetworkInfo().toFuture().get();
    Assertions.assertNotNull(info);
    Assertions.assertEquals("mijinTest", info.getName());
    Assertions.assertEquals("some description", info.getDescription());
}
Also used : NetworkInfo(io.nem.symbol.sdk.model.network.NetworkInfo) NetworkTypeDTO(io.nem.symbol.sdk.openapi.vertx.model.NetworkTypeDTO) Test(org.junit.jupiter.api.Test)

Example 3 with NetworkInfo

use of io.nem.symbol.sdk.model.network.NetworkInfo in project nem2-sdk-java by nemtech.

the class NetworkRepositoryOkHttpImplTest method shouldGetNetworkInfo.

@Test
void shouldGetNetworkInfo() throws Exception {
    NetworkTypeDTO networkTypeDTO = new NetworkTypeDTO();
    networkTypeDTO.setName("mijinTest");
    networkTypeDTO.setDescription("some description");
    mockRemoteCall(networkTypeDTO);
    NetworkInfo info = repository.getNetworkInfo().toFuture().get();
    Assertions.assertNotNull(info);
    Assertions.assertEquals("mijinTest", info.getName());
    Assertions.assertEquals("some description", info.getDescription());
}
Also used : NetworkInfo(io.nem.symbol.sdk.model.network.NetworkInfo) NetworkTypeDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.NetworkTypeDTO) Test(org.junit.jupiter.api.Test)

Aggregations

NetworkInfo (io.nem.symbol.sdk.model.network.NetworkInfo)3 Test (org.junit.jupiter.api.Test)2 NetworkTypeDTO (io.nem.symbol.sdk.openapi.okhttp_gson.model.NetworkTypeDTO)1 NetworkTypeDTO (io.nem.symbol.sdk.openapi.vertx.model.NetworkTypeDTO)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 EnumSource (org.junit.jupiter.params.provider.EnumSource)1