Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: HIP-904 Additional e2e test cases where receiver contract and already associated #16399

Merged
merged 16 commits into from
Nov 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: include error messages
Signed-off-by: Stanimir Stoyanov <stanimir.stoyanov@limechain.tech>
  • Loading branch information
stoyanov-st committed Oct 29, 2024
commit bf9cd0ac5d960eb35ed62ce15572828b0144676d
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.hedera.node.app.service.contract.impl.test.exec.systemcontracts.hts.airdrops;

import static com.hedera.hapi.node.base.ResponseCodeEnum.INVALID_RECEIVING_NODE_ACCOUNT;
import static com.hedera.hapi.node.base.ResponseCodeEnum.TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED;
import static com.hedera.node.app.service.contract.impl.exec.systemcontracts.hts.airdrops.TokenAirdropTranslator.TOKEN_AIRDROP;
import static com.hedera.node.app.service.contract.impl.test.TestHelpers.FUNGIBLE_TOKEN_HEADLONG_ADDRESS;
import static com.hedera.node.app.service.contract.impl.test.TestHelpers.FUNGIBLE_TOKEN_ID;
Expand Down Expand Up @@ -154,7 +156,7 @@ void tokenAirdropDecoderFailsIfReceiverIsSystemAcc() {
.willReturn(AccountID.newBuilder().accountNum(750).build());
assertThatExceptionOfType(HandleException.class)
.isThrownBy(() -> subject.decodeAirdrop(attempt))
.withMessage("");
.withMessage(INVALID_RECEIVING_NODE_ACCOUNT.protoName());
}

@Test
Expand Down Expand Up @@ -247,7 +249,7 @@ void tokenAirdropDecoderFailsIfAirdropExceedsLimits() {
given(ledgerConfig.nftTransfersMaxLen()).willReturn(10);
assertThatExceptionOfType(HandleException.class)
.isThrownBy(() -> subject.decodeAirdrop(attempt))
.withMessage("");
.withMessage(TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED.protoName());
}

@Test
Expand Down Expand Up @@ -297,6 +299,6 @@ void tokenAirdropDecoderForNFTFailsIfNftExceedLimits() {
given(ledgerConfig.nftTransfersMaxLen()).willReturn(10);
assertThatExceptionOfType(HandleException.class)
.isThrownBy(() -> subject.decodeAirdrop(attempt))
.withMessage("");
.withMessage(TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED.protoName());
}
}
Loading