Search in sources :

Example 6 with TransactionStatementSearchCriteria

use of io.nem.symbol.sdk.api.TransactionStatementSearchCriteria in project nem2-sdk-java by nemtech.

the class ReceiptRepositoryOkHttpImplTest method searchReceipts.

@Test
public void searchReceipts() throws Exception {
    List<TransactionStatementInfoDTO> transactionStatementInfoDTOS = jsonHelper.parseList(TestHelperOkHttp.loadResource("Recipient-TransactionResolutionStatement.json"), TransactionStatementInfoDTO.class);
    mockRemoteCall(toPage(transactionStatementInfoDTOS));
    BigInteger height = BigInteger.valueOf(10L);
    List<TransactionStatement> transactionStatements = repository.searchReceipts(new TransactionStatementSearchCriteria().height(height)).toFuture().get().getData();
    Assertions.assertEquals(transactionStatementInfoDTOS.size(), transactionStatements.size());
    Assertions.assertEquals("82FEFFC329618ECF56B8A6FDBCFCF1BF0A4B6747AB6A5746B195CEEB810F335C", transactionStatements.get(0).generateHash().toUpperCase());
}
Also used : TransactionStatementSearchCriteria(io.nem.symbol.sdk.api.TransactionStatementSearchCriteria) TransactionStatementInfoDTO(io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionStatementInfoDTO) BigInteger(java.math.BigInteger) TransactionStatement(io.nem.symbol.sdk.model.receipt.TransactionStatement) Test(org.junit.jupiter.api.Test)

Aggregations

TransactionStatementSearchCriteria (io.nem.symbol.sdk.api.TransactionStatementSearchCriteria)6 TransactionStatement (io.nem.symbol.sdk.model.receipt.TransactionStatement)6 ReceiptRepository (io.nem.symbol.sdk.api.ReceiptRepository)4 BigInteger (java.math.BigInteger)4 Page (io.nem.symbol.sdk.api.Page)2 ResolutionStatementSearchCriteria (io.nem.symbol.sdk.api.ResolutionStatementSearchCriteria)2 AddressResolutionStatement (io.nem.symbol.sdk.model.receipt.AddressResolutionStatement)2 MosaicResolutionStatement (io.nem.symbol.sdk.model.receipt.MosaicResolutionStatement)2 ReceiptType (io.nem.symbol.sdk.model.receipt.ReceiptType)2 Observable (io.reactivex.Observable)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 Test (org.junit.jupiter.api.Test)2 BlockRepository (io.nem.symbol.sdk.api.BlockRepository)1 MerkleProofInfo (io.nem.symbol.sdk.model.blockchain.MerkleProofInfo)1 ReceiptRoutesApi (io.nem.symbol.sdk.openapi.okhttp_gson.api.ReceiptRoutesApi)1 ApiClient (io.nem.symbol.sdk.openapi.okhttp_gson.invoker.ApiClient)1 Order (io.nem.symbol.sdk.openapi.okhttp_gson.model.Order)1 ReceiptTypeEnum (io.nem.symbol.sdk.openapi.okhttp_gson.model.ReceiptTypeEnum)1 ResolutionStatementPage (io.nem.symbol.sdk.openapi.okhttp_gson.model.ResolutionStatementPage)1