Search in sources :

Example 1 with TransactionRecordAsserts

use of com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts in project hedera-services by hashgraph.

the class UtilVerbs method childRecordsCheck.

public static HapiSpecOperation childRecordsCheck(String parentTxnId, ResponseCodeEnum parentalStatus, TransactionRecordAsserts... childRecordAsserts) {
    return withOpContext((spec, opLog) -> {
        var distributeTx = getTxnRecord(parentTxnId);
        allRunFor(spec, distributeTx);
        var distributeTxId = distributeTx.getResponseRecord().getTransactionID();
        SequentialID sequentialID = new SequentialID(distributeTxId);
        for (TransactionRecordAsserts childRecordAssert : childRecordAsserts) {
            childRecordAssert.txnId(sequentialID.nextChild());
        }
        allRunFor(spec, getTxnRecord(parentTxnId).andAllChildRecords().hasPriority(recordWith().status(parentalStatus).txnId(distributeTxId)).hasChildRecords(childRecordAsserts).logged());
    });
}
Also used : SequentialID(com.hedera.services.bdd.spec.assertions.SequentialID) TransactionRecordAsserts(com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts)

Aggregations

SequentialID (com.hedera.services.bdd.spec.assertions.SequentialID)1 TransactionRecordAsserts (com.hedera.services.bdd.spec.assertions.TransactionRecordAsserts)1