use of io.nem.symbol.sdk.openapi.vertx.model.ResolutionStatementInfoDTO in project nem2-sdk-java by nemtech.
the class ReceiptRepositoryVertxImplTest method searchMosaicResolutionStatements.
@Test
public void searchMosaicResolutionStatements() throws Exception {
ResolutionStatementDTO statement2 = new ResolutionStatementDTO();
ResolutionStatementInfoDTO mosaicResolutionStatement = new ResolutionStatementInfoDTO();
mosaicResolutionStatement.setStatement(statement2);
statement2.setUnresolved("9");
statement2.setHeight(BigInteger.valueOf(7L));
mockRemoteCall(toPage(mosaicResolutionStatement));
BigInteger height = BigInteger.valueOf(10L);
List<MosaicResolutionStatement> mosaicResolutionStatements = repository.searchMosaicResolutionStatements(new ResolutionStatementSearchCriteria().height(height)).toFuture().get().getData();
Assertions.assertEquals(1, mosaicResolutionStatements.size());
Assertions.assertEquals(BigInteger.valueOf(7L), mosaicResolutionStatements.get(0).getHeight());
Assertions.assertEquals(BigInteger.valueOf(9L), mosaicResolutionStatements.get(0).getUnresolved().getId());
}
use of io.nem.symbol.sdk.openapi.vertx.model.ResolutionStatementInfoDTO in project nem2-sdk-java by nemtech.
the class ReceiptRepositoryVertxImplTest method searchAddressResolutionStatements.
@Test
public void searchAddressResolutionStatements() throws Exception {
ResolutionStatementInfoDTO addressResolutionStatement = new ResolutionStatementInfoDTO();
Address address = Address.generateRandom(this.networkType);
ResolutionStatementDTO statement1 = new ResolutionStatementDTO();
addressResolutionStatement.setStatement(statement1);
statement1.setUnresolved(address.encoded());
statement1.setHeight(BigInteger.valueOf(6L));
mockRemoteCall(toPage(addressResolutionStatement));
BigInteger height = BigInteger.valueOf(10L);
List<AddressResolutionStatement> addressResolutionStatements = repository.searchAddressResolutionStatements(new ResolutionStatementSearchCriteria().height(height)).toFuture().get().getData();
Assertions.assertEquals(1, addressResolutionStatements.size());
Assertions.assertEquals(BigInteger.valueOf(6L), addressResolutionStatements.get(0).getHeight());
Assertions.assertEquals(address, addressResolutionStatements.get(0).getUnresolved());
}
Aggregations