Search in sources :

Example 6 with MerkleStateInfoDTO

use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.

the class HashLockRepositoryOkHttpImplTest method getHashLockMerkle.

@Test
public void getHashLockMerkle() throws Exception {
    mockRemoteCall(new MerkleStateInfoDTO().raw("abc"));
    MerkleStateInfo merkle = repository.getHashLockMerkle("hash").toFuture().get();
    Assertions.assertEquals("abc", merkle.getRaw());
}
Also used : MerkleStateInfo(io.nem.symbol.sdk.model.blockchain.MerkleStateInfo) MerkleStateInfoDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO) Test(org.junit.jupiter.api.Test)

Example 7 with MerkleStateInfoDTO

use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.

the class RestrictionMosaicRepositoryOkHttpImplTest method getMosaicRestrictionsMerkle.

@Test
public void getMosaicRestrictionsMerkle() throws Exception {
    mockRemoteCall(new MerkleStateInfoDTO().raw("abc"));
    MerkleStateInfo merkle = repository.getMosaicRestrictionsMerkle("abc").toFuture().get();
    Assertions.assertEquals("abc", merkle.getRaw());
}
Also used : MerkleStateInfo(io.nem.symbol.sdk.model.blockchain.MerkleStateInfo) MerkleStateInfoDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO) Test(org.junit.jupiter.api.Test)

Example 8 with MerkleStateInfoDTO

use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.

the class NamespaceRepositoryOkHttpImplTest method getNamespaceMerkle.

@Test
public void getNamespaceMerkle() throws Exception {
    NamespaceId namespaceId = NamespaceId.createFromName("accountalias");
    mockRemoteCall(new MerkleStateInfoDTO().raw("abc"));
    MerkleStateInfo merkle = repository.getNamespaceMerkle(namespaceId).toFuture().get();
    Assertions.assertEquals("abc", merkle.getRaw());
}
Also used : MerkleStateInfo(io.nem.symbol.sdk.model.blockchain.MerkleStateInfo) NamespaceId(io.nem.symbol.sdk.model.namespace.NamespaceId) MerkleStateInfoDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO) Test(org.junit.jupiter.api.Test)

Example 9 with MerkleStateInfoDTO

use of io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.

the class MetadataRepositoryOkHttpImplTest method getMetadataMerkle.

@Test
public void getMetadataMerkle() throws Exception {
    mockRemoteCall(new MerkleStateInfoDTO().raw("abc"));
    MerkleStateInfo merkle = repository.getMetadataMerkle("abc").toFuture().get();
    Assertions.assertEquals("abc", merkle.getRaw());
}
Also used : MerkleStateInfo(io.nem.symbol.sdk.model.blockchain.MerkleStateInfo) MerkleStateInfoDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO) Test(org.junit.jupiter.api.Test)

Aggregations

MerkleStateInfo (io.nem.symbol.sdk.model.blockchain.MerkleStateInfo)9 MerkleStateInfoDTO (io.nem.symbol.sdk.openapi.okhttp_gson.model.MerkleStateInfoDTO)9 Test (org.junit.jupiter.api.Test)8 Address (io.nem.symbol.sdk.model.account.Address)1 MosaicId (io.nem.symbol.sdk.model.mosaic.MosaicId)1 NamespaceId (io.nem.symbol.sdk.model.namespace.NamespaceId)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 MethodSource (org.junit.jupiter.params.provider.MethodSource)1