use of io.nem.symbol.sdk.openapi.vertx.model.FinalizationProofDTO in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryVertxImplTest method getFinalizationProofAtHeight.
@Test
public void getFinalizationProofAtHeight() throws Exception {
FinalizationProofDTO dto = createFinalizationProofDTO();
mockRemoteCall(dto);
FinalizationProof finalizationProof = repository.getFinalizationProofAtHeight(BigInteger.valueOf(123)).toFuture().get();
validate(finalizationProof, dto);
}
use of io.nem.symbol.sdk.openapi.vertx.model.FinalizationProofDTO in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryVertxImplTest method createFinalizationProofDTO.
private FinalizationProofDTO createFinalizationProofDTO() {
FinalizationProofDTO dto = new FinalizationProofDTO();
dto.finalizationEpoch(1L);
dto.finalizationPoint(2L);
dto.setVersion(3);
dto.hash("abc");
dto.height(BigInteger.valueOf(4));
MessageGroup messageGroup = new MessageGroup();
messageGroup.stage(StageEnum.NUMBER_1);
messageGroup.addHashesItem("hash1");
messageGroup.setHeight(BigInteger.valueOf(20));
messageGroup.addSignaturesItem(new BmTreeSignature().bottom(new ParentPublicKeySignaturePair().signature("sp").parentPublicKey("pp")).root(new ParentPublicKeySignaturePair().signature("sr").parentPublicKey("pr")));
dto.addMessageGroupsItem(messageGroup);
return dto;
}
use of io.nem.symbol.sdk.openapi.vertx.model.FinalizationProofDTO in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryVertxImplTest method getFinalizationProofAtEpoch.
@Test
public void getFinalizationProofAtEpoch() throws Exception {
FinalizationProofDTO dto = createFinalizationProofDTO();
mockRemoteCall(dto);
FinalizationProof finalizationProof = repository.getFinalizationProofAtEpoch(123).toFuture().get();
validate(finalizationProof, dto);
}
Aggregations