@Test public void testGetTxReceipt() throws Exception { final TransactionTemplate transactionTemplate = new TransactionTemplate(contextStorage); final Requester mockRequester = mock(Requester.class); final TxReceipt expected = TxReceipt.newBuilder().build(); when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any())) .thenReturn(expected); transactionTemplate.requester = mockRequester; final TxReceipt actual = transactionTemplate.getTxReceipt(anyTxHash); assertEquals(expected, actual); }
@Override public TxReceipt getTxReceipt(TxHash txHash) { return request(transactionMethods.getTxReceipt(), Arrays.<Object>asList(txHash)); }
TransactionTemplate extends AbstractTemplate implements TransactionOperation { @Override public TxReceipt getTxReceipt(TxHash txHash) { return request(transactionMethods.getTxReceipt(), Arrays.<Object>asList(txHash)); } }
TransactionTemplate extends AbstractTemplate implements TransactionOperation { @Override public TxReceipt getTxReceipt(TxHash txHash) { return request(transactionMethods.getTxReceipt(), Arrays.<Object>asList(txHash)); } TransactionTemplate(final ContextStorage<Context> contextStorage); }
TransactionTemplate extends AbstractTemplate implements TransactionOperation { @Override public TxReceipt getTxReceipt(TxHash txHash) { return request(transactionMethods.getTxReceipt(), Arrays.<Object>asList(txHash)); } TransactionTemplate(final ContextStorage<Context> contextStorage); @Override Transaction getTransaction(final TxHash txHash); @Override TxReceipt getTxReceipt(TxHash txHash); @Override TxHash commit(final Transaction transaction); @Override TxHash sendTx(final Signer signer, final AccountAddress recipient, final Aer amount,
      final long nonce, final Fee fee, final BytesValue payload); @Override TxHash sendTx(final Signer signer, final Name recipient, final Aer amount,
      final long nonce, final Fee fee, final BytesValue payload); }
TransactionTemplate extends AbstractTemplate implements TransactionOperation { @Override public TxReceipt getTxReceipt(TxHash txHash) { return request(transactionMethods.getTxReceipt(), Arrays.<Object>asList(txHash)); } TransactionTemplate(final ContextStorage<Context> contextStorage); @Override Transaction getTransaction(final TxHash txHash); @Override TxReceipt getTxReceipt(TxHash txHash); @Override TxHash commit(final Transaction transaction); @Override TxHash sendTx(final Signer signer, final AccountAddress recipient, final Aer amount,
      final long nonce, final Fee fee, final BytesValue payload); @Override TxHash sendTx(final Signer signer, final Name recipient, final Aer amount,
      final long nonce, final Fee fee, final BytesValue payload);  }