use of org.fisco.bcos.web3j.protocol.core.methods.response.BcosTransactionReceipt in project web3sdk by FISCO-BCOS.
the class ManagedTransactionTester method prepareTransactionReceipt.
@SuppressWarnings("unchecked")
void prepareTransactionReceipt(TransactionReceipt transactionReceipt) throws IOException {
BcosTransactionReceipt ethGetTransactionReceipt = new BcosTransactionReceipt();
ethGetTransactionReceipt.setResult(transactionReceipt);
Request<?, BcosTransactionReceipt> getTransactionReceiptRequest = mock(Request.class);
when(getTransactionReceiptRequest.send()).thenReturn(ethGetTransactionReceipt);
when(web3j.getTransactionReceipt(TRANSACTION_HASH)).thenReturn((Request) getTransactionReceiptRequest);
}
use of org.fisco.bcos.web3j.protocol.core.methods.response.BcosTransactionReceipt in project web3sdk by FISCO-BCOS.
the class Web3jApITest method getTransactionReceipt.
@Test
public void getTransactionReceipt() throws IOException {
BcosTransactionReceipt bcosTransactionReceipt = web3j.getTransactionReceipt(txHash).send();
TransactionReceipt transactionReceipt = bcosTransactionReceipt.getTransactionReceipt().get();
assertNotNull(transactionReceipt);
}
Aggregations