Search in sources :

Example 1 with AccountStakersQuery

use of com.hedera.hashgraph.sdk.AccountStakersQuery in project hedera-sdk-java by hashgraph.

the class AccountStakersIntegrationTest method cannotQueryAccountStakersSinceItIsNotSupported.

@Test
@DisplayName("Cannot query account stakers since it is not supported")
void cannotQueryAccountStakersSinceItIsNotSupported() throws Exception {
    var testEnv = new IntegrationTestEnv(1);
    assertThatExceptionOfType(PrecheckStatusException.class).isThrownBy(() -> {
        new AccountStakersQuery().setAccountId(testEnv.operatorId).setMaxQueryPayment(new Hbar(1)).execute(testEnv.client);
    }).withMessageContaining(Status.NOT_SUPPORTED.toString());
    testEnv.close();
}
Also used : AccountStakersQuery(com.hedera.hashgraph.sdk.AccountStakersQuery) Hbar(com.hedera.hashgraph.sdk.Hbar) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

AccountStakersQuery (com.hedera.hashgraph.sdk.AccountStakersQuery)1 Hbar (com.hedera.hashgraph.sdk.Hbar)1 DisplayName (org.junit.jupiter.api.DisplayName)1 Test (org.junit.jupiter.api.Test)1