Search in sources :

Example 1 with ReceiptStatusException

use of com.hedera.hashgraph.sdk.ReceiptStatusException in project hedera-mirror-node by hashgraph.

the class PublishMetricsTest method onErrorReceiptStatusException.

@Test
void onErrorReceiptStatusException() throws Exception {
    TransactionId transactionId = TransactionId.withValidStart(AccountId.fromString("0.0.3"), Instant.now());
    TransactionReceipt transactionReceipt = receipt(ResponseCodeEnum.SUCCESS);
    Constructor<ReceiptStatusException> constructor = getDeclaredConstructor(ReceiptStatusException.class);
    constructor.setAccessible(true);
    ReceiptStatusException receiptStatusException = constructor.newInstance(transactionId, transactionReceipt);
    onError(receiptStatusException, ResponseCodeEnum.SUCCESS.toString());
}
Also used : TransactionReceipt(com.hedera.hashgraph.sdk.TransactionReceipt) ReceiptStatusException(com.hedera.hashgraph.sdk.ReceiptStatusException) TransactionId(com.hedera.hashgraph.sdk.TransactionId) Test(org.junit.jupiter.api.Test)

Aggregations

ReceiptStatusException (com.hedera.hashgraph.sdk.ReceiptStatusException)1 TransactionId (com.hedera.hashgraph.sdk.TransactionId)1 TransactionReceipt (com.hedera.hashgraph.sdk.TransactionReceipt)1 Test (org.junit.jupiter.api.Test)1