use of com.github.rosklyar.client.account.domain.transaction.Transactions in project nem-library by rosklyar.
the class AccountClientTest method getAllTransactions.
@Test
void getAllTransactions() {
Transactions transactions = accountClient.allTransactions(address);
assertEquals(55000000, transactions.data.stream().mapToLong(pair -> pair.transaction.fee).sum());
Transactions transactionsBeforeInputTransactionHash = accountClient.allTransactions(address, transactions.data.stream().findFirst().map(tr -> tr.meta.id).orElseThrow(RuntimeException::new));
assertEquals(transactions.data.size() - 1, transactionsBeforeInputTransactionHash.data.size());
}
use of com.github.rosklyar.client.account.domain.transaction.Transactions in project nem-library by rosklyar.
the class AccountClientTest method getDecodedAllTransactions.
@Test
@Disabled("only for local NIS nodes")
void getDecodedAllTransactions() {
Transactions transactions = accountClient.allDecodedTransactions(new AccountPrivateKeyTransactionsPage(privateKey, null, null));
assertEquals("", transactions.data.stream().findFirst().map(pair -> pair.transaction.message.payload).orElse(null));
}
use of com.github.rosklyar.client.account.domain.transaction.Transactions in project nem-library by rosklyar.
the class AccountClientTest method getDecodedIncomingTransactions.
@Test
@Disabled("only for local NIS nodes")
void getDecodedIncomingTransactions() {
Transactions transactions = accountClient.incomingDecodedTransactions(new AccountPrivateKeyTransactionsPage(privateKey, null, null));
assertEquals("", transactions.data.stream().findFirst().map(pair -> pair.transaction.message.payload).orElse(null));
}
use of com.github.rosklyar.client.account.domain.transaction.Transactions in project nem-library by rosklyar.
the class AccountClientTest method getIncomingTransactions.
@Test
void getIncomingTransactions() {
Transactions transactions = accountClient.incomingTransactions(address);
assertEquals(2, transactions.data.size());
Transactions transactionsBeforeInputTransactionHash = accountClient.incomingTransactions(address, transactions.data.stream().findFirst().map(tr -> tr.meta.id).orElseThrow(RuntimeException::new));
assertEquals(transactions.data.size() - 1, transactionsBeforeInputTransactionHash.data.size());
}
use of com.github.rosklyar.client.account.domain.transaction.Transactions in project nem-library by rosklyar.
the class AccountClientTest method getOutgoingTransactions.
@Test
void getOutgoingTransactions() {
Transactions transactions = accountClient.outgoingTransactions(address);
assertEquals(26000000, transactions.data.stream().mapToLong(pair -> pair.transaction.fee).sum());
Transactions transactionsBeforeInputTransactionHash = accountClient.outgoingTransactions(address, transactions.data.stream().findFirst().map(tr -> tr.meta.id).orElseThrow(RuntimeException::new));
assertEquals(transactions.data.size() - 1, transactionsBeforeInputTransactionHash.data.size());
}
Aggregations