@Test public void sendTransactionSync() throws Exception { initWithRandomAccount(); String expectedAccountId = "GDKJAMCTGZGD6KM7RBEII6QUYAHQQUGERXKM3ESHBX2UUNTNAVNB3OGX"; BigDecimal expectedAmount = new BigDecimal("12.2"); TransactionId expectedTransactionId = new TransactionIdImpl("myId"); when(mockTransactionSender.sendTransaction((Transaction) any())).thenReturn(expectedTransactionId); Transaction transaction = kinAccount.buildTransactionSync(expectedAccountId, expectedAmount, 100); TransactionId transactionId = kinAccount.sendTransactionSync(transaction); verify(mockTransactionSender).sendTransaction(transaction); assertEquals(expectedTransactionId, transactionId); }
@NonNull @Override public TransactionId sendTransactionSync(Transaction transaction) throws OperationFailedException { checkValidAccount(); return transactionSender.sendTransaction(transaction); }
KinAccountImpl extends AbstractKinAccount { @NonNull @Override public TransactionId sendTransactionSync(Transaction transaction) throws OperationFailedException { checkValidAccount(); return transactionSender.sendTransaction(transaction); } }
KinAccountImpl extends AbstractKinAccount { @NonNull @Override public TransactionId sendTransactionSync(Transaction transaction) throws OperationFailedException { checkValidAccount(); return transactionSender.sendTransaction(transaction); } KinAccountImpl(KeyPair account, BackupRestore backupRestore, TransactionSender transactionSender,
                   AccountInfoRetriever accountInfoRetriever, BlockchainEventsCreator blockchainEventsCreator); }
KinAccountImpl extends AbstractKinAccount { @NonNull @Override public TransactionId sendTransactionSync(Transaction transaction) throws OperationFailedException { checkValidAccount(); return transactionSender.sendTransaction(transaction); } KinAccountImpl(KeyPair account, BackupRestore backupRestore, TransactionSender transactionSender,
                   AccountInfoRetriever accountInfoRetriever, BlockchainEventsCreator blockchainEventsCreator); @Override String getPublicAddress(); @Override Transaction buildTransactionSync(@NonNull String publicAddress, @NonNull BigDecimal amount,
                                            int fee); @Override Transaction buildTransactionSync(@NonNull String publicAddress, @NonNull BigDecimal amount,
                                            int fee, @Nullable String memo); @NonNull @Override TransactionId sendTransactionSync(Transaction transaction); @NonNull @Override TransactionId sendWhitelistTransactionSync(String whitelist); @NonNull @Override Balance getBalanceSync(); @Override int getStatusSync(); @Override ListenerRegistration addBalanceListener(@NonNull EventListener<Balance> listener); @Override ListenerRegistration addPaymentListener(@NonNull EventListener<PaymentInfo> listener); @Override ListenerRegistration addAccountCreationListener(EventListener<Void> listener); @Override String export(@NonNull String passphrase); }
KinAccountImpl extends AbstractKinAccount { @NonNull @Override public TransactionId sendTransactionSync(Transaction transaction) throws OperationFailedException { checkValidAccount(); return transactionSender.sendTransaction(transaction); } KinAccountImpl(KeyPair account, BackupRestore backupRestore, TransactionSender transactionSender,
                   AccountInfoRetriever accountInfoRetriever, BlockchainEventsCreator blockchainEventsCreator); @Override String getPublicAddress(); @Override Transaction buildTransactionSync(@NonNull String publicAddress, @NonNull BigDecimal amount,
                                            int fee); @Override Transaction buildTransactionSync(@NonNull String publicAddress, @NonNull BigDecimal amount,
                                            int fee, @Nullable String memo); @NonNull @Override TransactionId sendTransactionSync(Transaction transaction); @NonNull @Override TransactionId sendWhitelistTransactionSync(String whitelist); @NonNull @Override Balance getBalanceSync(); @Override int getStatusSync(); @Override ListenerRegistration addBalanceListener(@NonNull EventListener<Balance> listener); @Override ListenerRegistration addPaymentListener(@NonNull EventListener<PaymentInfo> listener); @Override ListenerRegistration addAccountCreationListener(EventListener<Void> listener); @Override String export(@NonNull String passphrase);  }