use of io.nem.symbol.sdk.model.finalization.FinalizationProof in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryOkHttpImplTest method getFinalizationProofAtEpoch.
@Test
public void getFinalizationProofAtEpoch() throws Exception {
FinalizationProofDTO dto = createFinalizationProofDTO();
mockRemoteCall(dto);
FinalizationProof finalizationProof = repository.getFinalizationProofAtEpoch(123).toFuture().get();
validate(finalizationProof, dto);
}
use of io.nem.symbol.sdk.model.finalization.FinalizationProof in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryIntegrationTest method getFinalizationProofAtHeight.
@ParameterizedTest
@EnumSource(RepositoryType.class)
void getFinalizationProofAtHeight(RepositoryType type) {
FinalizationRepository repository = getRepositoryFactory(type).createFinalizationRepository();
FinalizationProof finalizationProof = get(repository.getFinalizationProofAtHeight(BigInteger.ONE));
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 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.model.finalization.FinalizationProof in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryOkHttpImplTest 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.model.finalization.FinalizationProof in project nem2-sdk-java by nemtech.
the class FinalizationRepositoryIntegrationTest method getFinalizationProofAtCurrentFinalizedHeight.
@ParameterizedTest
@EnumSource(RepositoryType.class)
void getFinalizationProofAtCurrentFinalizedHeight(RepositoryType type) {
RepositoryFactory repositoryFactory = getRepositoryFactory(type);
FinalizedBlock finalizedBlock = get(repositoryFactory.createChainRepository().getChainInfo()).getLatestFinalizedBlock();
FinalizationRepository repository = repositoryFactory.createFinalizationRepository();
FinalizationProof finalizationProof = get(repository.getFinalizationProofAtHeight(finalizedBlock.getHeight()));
Assertions.assertEquals(finalizationProof.getFinalizationEpoch(), finalizationProof.getFinalizationEpoch());
Assertions.assertEquals(finalizationProof.getFinalizationPoint(), finalizationProof.getFinalizationPoint());
Assertions.assertEquals(finalizationProof.getHeight(), finalizationProof.getHeight());
Assertions.assertEquals(1, finalizationProof.getVersion());
}
Aggregations