use of com.hedera.services.bdd.spec.assertions.SequentialID 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());
});
}
Aggregations