Search in sources :

Example 1 with ServerInfo

use of io.nem.symbol.sdk.model.node.ServerInfo in project nem2-sdk-java by nemtech.

the class NodeRepositoryIntegrationTest method getServerInfo.

@ParameterizedTest
@EnumSource(RepositoryType.class)
void getServerInfo(RepositoryType type) {
    ServerInfo serverInfo = get(getNodeRepository(type).getServerInfo());
    assertNotEquals("", serverInfo.getRestVersion());
    assertNotEquals("", serverInfo.getSdkVersion());
}
Also used : ServerInfo(io.nem.symbol.sdk.model.node.ServerInfo) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 2 with ServerInfo

use of io.nem.symbol.sdk.model.node.ServerInfo in project nem2-sdk-java by nemtech.

the class NodeRepositoryOkHttpImplTest method shouldGetServerInfo.

@Test
public void shouldGetServerInfo() throws Exception {
    ServerInfoDTO dto = new ServerInfoDTO();
    ServerDTO serverInfoDto = new ServerDTO();
    serverInfoDto.setRestVersion("RestVersion1");
    serverInfoDto.setSdkVersion("SdkVersion1");
    dto.serverInfo(serverInfoDto);
    mockRemoteCall(dto);
    ServerInfo serverInfo = repository.getServerInfo().toFuture().get();
    Assertions.assertEquals(dto.getServerInfo().getRestVersion(), serverInfo.getRestVersion());
    Assertions.assertEquals(dto.getServerInfo().getSdkVersion(), serverInfo.getSdkVersion());
}
Also used : ServerDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.ServerDTO) ServerInfo(io.nem.symbol.sdk.model.node.ServerInfo) ServerInfoDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.ServerInfoDTO) Test(org.junit.jupiter.api.Test)

Example 3 with ServerInfo

use of io.nem.symbol.sdk.model.node.ServerInfo in project nem2-sdk-java by nemtech.

the class NodeRepositoryOkVertxImplTest method shouldGetServerInfo.

@Test
public void shouldGetServerInfo() throws Exception {
    ServerInfoDTO dto = new ServerInfoDTO();
    ServerDTO serverInfoDto = new ServerDTO();
    serverInfoDto.setRestVersion("RestVersion1");
    serverInfoDto.setSdkVersion("SdkVersion1");
    dto.serverInfo(serverInfoDto);
    mockRemoteCall(dto);
    ServerInfo serverInfo = repository.getServerInfo().toFuture().get();
    Assertions.assertEquals(dto.getServerInfo().getRestVersion(), serverInfo.getRestVersion());
    Assertions.assertEquals(dto.getServerInfo().getSdkVersion(), serverInfo.getSdkVersion());
}
Also used : ServerDTO(io.nem.symbol.sdk.openapi.vertx.model.ServerDTO) ServerInfo(io.nem.symbol.sdk.model.node.ServerInfo) ServerInfoDTO(io.nem.symbol.sdk.openapi.vertx.model.ServerInfoDTO) Test(org.junit.jupiter.api.Test)

Aggregations

ServerInfo (io.nem.symbol.sdk.model.node.ServerInfo)3 Test (org.junit.jupiter.api.Test)2 ServerDTO (io.nem.symbol.sdk.openapi.okhttp_gson.model.ServerDTO)1 ServerInfoDTO (io.nem.symbol.sdk.openapi.okhttp_gson.model.ServerInfoDTO)1 ServerDTO (io.nem.symbol.sdk.openapi.vertx.model.ServerDTO)1 ServerInfoDTO (io.nem.symbol.sdk.openapi.vertx.model.ServerInfoDTO)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 EnumSource (org.junit.jupiter.params.provider.EnumSource)1