use of io.nem.symbol.sdk.openapi.vertx.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.
the class MultisigRepositoryVertxImplTest method getMultisigAccountInfoMerkle.
@Test
public void getMultisigAccountInfoMerkle() throws Exception {
Address address = Address.generateRandom(this.networkType);
mockRemoteCall(new MerkleStateInfoDTO().raw("abc"));
MerkleStateInfo merkle = repository.getMultisigAccountInfoMerkle(address).toFuture().get();
Assertions.assertEquals("abc", merkle.getRaw());
}
use of io.nem.symbol.sdk.openapi.vertx.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.
the class HashLockRepositoryVertxImplTest 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());
}
use of io.nem.symbol.sdk.openapi.vertx.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.
the class MerkleMapperVertxTest method testDtoToModelMapping.
@ParameterizedTest
@MethodSource("merkleJsonFiles")
void testDtoToModelMapping(String jsonFilename) {
String json = TestHelperVertx.loadResource(jsonFilename);
MerkleMapper merkleMapper = new MerkleMapper(jsonHelper);
MerkleStateInfoDTO dto = jsonHelper.parse(json, MerkleStateInfoDTO.class);
MerkleStateInfo merkleStateInfo = merkleMapper.toMerkleStateInfo(dto);
Assertions.assertFalse(merkleStateInfo.getTree().getBranches().isEmpty());
Assertions.assertNotNull(merkleStateInfo.getTree().getLeaf());
}
use of io.nem.symbol.sdk.openapi.vertx.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.
the class MosaicRepositoryVertxImplTest method getMetadataMerkle.
@Test
public void getMetadataMerkle() throws Exception {
MosaicId mosaicId = MapperUtils.toMosaicId("481110499");
mockRemoteCall(new MerkleStateInfoDTO().raw("abc"));
MerkleStateInfo merkle = repository.getMosaicMerkle(mosaicId).toFuture().get();
Assertions.assertEquals("abc", merkle.getRaw());
}
use of io.nem.symbol.sdk.openapi.vertx.model.MerkleStateInfoDTO in project nem2-sdk-java by nemtech.
the class NamespaceRepositoryVertxImplTest 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());
}
Aggregations