Search in sources :

Example 1 with PrecheckStatusException

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

the class PublishMetricsTest method onErrorPrecheckStatusException.

@Test
void onErrorPrecheckStatusException() throws Exception {
    TransactionId transactionId = TransactionId.withValidStart(AccountId.fromString("0.0.3"), Instant.now());
    com.hedera.hashgraph.sdk.Status status = com.hedera.hashgraph.sdk.Status.SUCCESS;
    Constructor<PrecheckStatusException> constructor = getDeclaredConstructor(PrecheckStatusException.class);
    constructor.setAccessible(true);
    PrecheckStatusException precheckStatusException = constructor.newInstance(status, transactionId);
    onError(precheckStatusException, status.toString());
}
Also used : PrecheckStatusException(com.hedera.hashgraph.sdk.PrecheckStatusException) TransactionId(com.hedera.hashgraph.sdk.TransactionId) Test(org.junit.jupiter.api.Test)

Aggregations

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