Skip to content

Commit

Permalink
Enable HRCPrecompileSuite tests (#10073)
Browse files Browse the repository at this point in the history
Signed-off-by: Mustafa Uzun <mustafa.uzun@limechain.tech>
  • Loading branch information
mustafauzunn committed Nov 23, 2023
1 parent edc657a commit fd86222
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_NOT_ASSOCIATED_TO_ACCOUNT;
import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES;

import com.hedera.services.bdd.junit.HapiTest;
import com.hedera.services.bdd.junit.HapiTestSuite;
import com.hedera.services.bdd.spec.HapiSpec;
import com.hedera.services.bdd.suites.HapiSuite;
Expand Down Expand Up @@ -100,6 +101,7 @@ public List<HapiSpec> getSpecsInSuite() {
hrcTooManyTokenAssociateShouldFail());
}

@HapiTest
private HapiSpec hrcNftAndFungibleTokenAssociateFromEOA() {
final AtomicReference<String> fungibleTokenNum = new AtomicReference<>();
final AtomicReference<String> nonfungibleTokenNum = new AtomicReference<>();
Expand Down Expand Up @@ -211,6 +213,7 @@ private HapiSpec hrcNftAndFungibleTokenAssociateFromEOA() {
htsPrecompileResult().withStatus(SUCCESS)))))));
}

@HapiTest
private HapiSpec hrcNFTAndFungibleTokenAssociateFromContract() {
return defaultHapiSpec("hrcNFTAndFungibleTokenAssociateFromContract")
.given(
Expand Down Expand Up @@ -317,6 +320,7 @@ private HapiSpec hrcNFTAndFungibleTokenAssociateFromContract() {
htsPrecompileResult().withStatus(SUCCESS)))))));
}

@HapiTest
private HapiSpec hrcTokenAssociateFromSameEOATwiceShouldFail() {
final AtomicReference<String> fungibleTokenNum = new AtomicReference<>();

Expand Down Expand Up @@ -382,6 +386,7 @@ private HapiSpec hrcTokenAssociateFromSameEOATwiceShouldFail() {
.withStatus(TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT)))))));
}

@HapiTest
private HapiSpec hrcTokenDissociateWhenNotAssociatedShouldFail() {
final AtomicReference<String> fungibleTokenNum = new AtomicReference<>();

Expand Down Expand Up @@ -429,6 +434,7 @@ private HapiSpec hrcTokenDissociateWhenNotAssociatedShouldFail() {
.withStatus(TOKEN_NOT_ASSOCIATED_TO_ACCOUNT)))))));
}

@HapiTest
private HapiSpec hrcTokenDissociateWhenBalanceNotZeroShouldFail() {
final AtomicReference<String> fungibleTokenNum = new AtomicReference<>();

Expand Down Expand Up @@ -496,6 +502,7 @@ private HapiSpec hrcTokenDissociateWhenBalanceNotZeroShouldFail() {
.withStatus(TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES)))))));
}

@HapiTest
private HapiSpec hrcTooManyTokenAssociateShouldFail() {
final AtomicReference<String> fungibleTokenNum1 = new AtomicReference<>();
final AtomicReference<String> fungibleTokenNum2 = new AtomicReference<>();
Expand Down

0 comments on commit fd86222

Please sign in to comment.