use of io.nem.symbol.sdk.model.finalization.FinalizationProof in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryIntegrationTest method getFinalizationProofAtEpochLatest.
@ParameterizedTest
@EnumSource(RepositoryType.class)
void getFinalizationProofAtEpochLatest(RepositoryType type) {
RepositoryFactory repositoryFactory = getRepositoryFactory(type);
FinalizedBlock finalizedBlock = get(repositoryFactory.createChainRepository().getChainInfo()).getLatestFinalizedBlock();
FinalizationRepository repository = repositoryFactory.createFinalizationRepository();
FinalizationProof finalizationProof = get(repository.getFinalizationProofAtEpoch(finalizedBlock.getFinalizationEpoch()));
Assertions.assertEquals(finalizationProof.getFinalizationEpoch(), finalizationProof.getFinalizationEpoch());
Assertions.assertEquals(finalizationProof.getFinalizationPoint(), finalizationProof.getFinalizationPoint());
Assertions.assertEquals(finalizationProof.getHeight(), finalizationProof.getHeight());
Assertions.assertEquals(1, finalizationProof.getVersion());
}
use of io.nem.symbol.sdk.model.finalization.FinalizationProof in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryIntegrationTest method getFinalizationProofAtEpoch.
@ParameterizedTest
@EnumSource(RepositoryType.class)
void getFinalizationProofAtEpoch(RepositoryType type) {
FinalizationRepository repository = getRepositoryFactory(type).createFinalizationRepository();
FinalizationProof finalizationProof = get(repository.getFinalizationProofAtEpoch(1));
Assertions.assertEquals(1L, finalizationProof.getFinalizationEpoch());
Assertions.assertEquals(1L, finalizationProof.getFinalizationPoint());
Assertions.assertEquals(BigInteger.ONE, finalizationProof.getHeight());
Assertions.assertEquals(1, finalizationProof.getVersion());
}
use of io.nem.symbol.sdk.model.finalization.FinalizationProof 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