Search in sources :

Example 6 with TxnValidityAndFeeReq

use of com.hedera.services.context.domain.process.TxnValidityAndFeeReq in project hedera-services by hashgraph.

the class TransactionPrecheckTest method abortsOnInsolvencyForTopLevel.

@Test
void abortsOnInsolvencyForTopLevel() {
    givenActivePlatform();
    givenStructuralSoundness();
    givenValidSyntax();
    givenValidSemantics();
    given(solvencyPrecheck.assessSansSvcFees(any())).willReturn(new TxnValidityAndFeeReq(INSUFFICIENT_TX_FEE, reqFee));
    final var topLevelResponse = subject.performForTopLevel(Transaction.getDefaultInstance());
    assertFailure(INSUFFICIENT_TX_FEE, reqFee, topLevelResponse);
}
Also used : TxnValidityAndFeeReq(com.hedera.services.context.domain.process.TxnValidityAndFeeReq) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

TxnValidityAndFeeReq (com.hedera.services.context.domain.process.TxnValidityAndFeeReq)6 Test (org.junit.jupiter.api.Test)3 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)3 InvalidAccountIDException (com.hedera.services.legacy.exception.InvalidAccountIDException)1 KeyPrefixMismatchException (com.hedera.services.legacy.exception.KeyPrefixMismatchException)1 SignedTxnAccessor (com.hedera.services.utils.SignedTxnAccessor)1 ResponseCodeEnum (com.hederahashgraph.api.proto.java.ResponseCodeEnum)1