use of com.hedera.mirror.common.domain.transaction.Transaction in project hedera-mirror-node by hashgraph.
the class CryptoApproveAllowanceTransactionHandlerTest method updateTransactionWithAliasNotFoundAndPartialDataActionSkip.
@Test
void updateTransactionWithAliasNotFoundAndPartialDataActionSkip() {
recordParserProperties.setPartialDataAction(PartialDataAction.SKIP);
var alias = DomainUtils.fromBytes(domainBuilder.key());
var recordItem = recordItemBuilder.cryptoApproveAllowance().transactionBody(b -> {
b.getCryptoAllowancesBuilderList().forEach(builder -> builder.getOwnerBuilder().setAlias(alias));
b.getNftAllowancesBuilderList().forEach(builder -> builder.getOwnerBuilder().setAlias(alias));
b.getTokenAllowancesBuilderList().forEach(builder -> builder.getOwnerBuilder().setAlias(alias));
}).build();
var transaction = domainBuilder.transaction().get();
when(entityIdService.lookup(AccountID.newBuilder().setAlias(alias).build())).thenThrow(new AliasNotFoundException("alias", EntityType.ACCOUNT));
transactionHandler.updateTransaction(transaction, recordItem);
verifyNoInteractions(entityListener);
}
use of com.hedera.mirror.common.domain.transaction.Transaction in project hedera-mirror-node by hashgraph.
the class CryptoDeleteAllowanceTransactionHandlerTest method updateTransactionUnsuccessful.
@Test
void updateTransactionUnsuccessful() {
var transaction = new Transaction();
RecordItem recordItem = recordItemBuilder.cryptoDeleteAllowance().receipt(r -> r.setStatus(ResponseCodeEnum.ACCOUNT_DELETED)).build();
transactionHandler.updateTransaction(transaction, recordItem);
verifyNoInteractions(entityListener);
}
Aggregations