use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperVertxTest method shouldCreateStandaloneMosaicGlobalRestrictionTransaction.
@Test
void shouldCreateStandaloneMosaicGlobalRestrictionTransaction() {
TransactionInfoDTO mosaicGlobalRestrictionTransactionDTO = TestHelperVertx.loadTransactionInfoDTO("standaloneMosaicGlobalRestrictionTransaction.json");
Transaction mosaicGlobalRestrictionTransaction = map(mosaicGlobalRestrictionTransactionDTO);
validateStandaloneTransaction(mosaicGlobalRestrictionTransaction, mosaicGlobalRestrictionTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperVertxTest method shouldCreateAggregateMosaicGlobalRestrictionTransaction.
@Test
void shouldCreateAggregateMosaicGlobalRestrictionTransaction() {
TransactionInfoDTO aggregateMosaicGlobalRestrictionTransactionDTO = TestHelperVertx.loadTransactionInfoDTO("aggregateMosaicGlobalRestrictionTransaction.json");
Transaction aggregateMosaicGlobalRestrictionTransaction = map(aggregateMosaicGlobalRestrictionTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateMosaicGlobalRestrictionTransaction, aggregateMosaicGlobalRestrictionTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperVertxTest method shouldCreateAggregateMosaicAliasTransaction.
@Test
void shouldCreateAggregateMosaicAliasTransaction() {
TransactionInfoDTO aggregateTransferTransactionDTO = TestHelperVertx.loadTransactionInfoDTO("aggregateMosaicAliasTransaction.json");
Transaction aggregateTransferTransaction = map(aggregateTransferTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateTransferTransaction, aggregateTransferTransactionDTO);
MosaicAliasTransaction transaction = (MosaicAliasTransaction) ((AggregateTransaction) aggregateTransferTransaction).getInnerTransactions().get(0);
Assertions.assertEquals(new BigInteger("884562898459306"), transaction.getMosaicId().getId());
Assertions.assertEquals(AliasAction.UNLINK, transaction.getAliasAction());
Assertions.assertEquals(new BigInteger("307262000798378"), transaction.getNamespaceId().getId());
}
use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperVertxTest method shouldCreateStandaloneLockFundsTransaction.
@Test
void shouldCreateStandaloneLockFundsTransaction() {
TransactionInfoDTO lockFundsTransactionDTO = TestHelperVertx.loadTransactionInfoDTO("standaloneLockFundsTransaction.json");
Transaction lockFundsTransaction = map(lockFundsTransactionDTO);
validateStandaloneTransaction(lockFundsTransaction, lockFundsTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperVertxTest method shouldCreateAccountAddressRestriction.
@Test
public void shouldCreateAccountAddressRestriction() throws Exception {
TransactionInfoDTO transactionInfoDTO = TestHelperVertx.loadTransactionInfoDTO("accountAddressRestrictionTransaction.json");
AccountAddressRestrictionTransaction transaction = (AccountAddressRestrictionTransaction) map(transactionInfoDTO);
validateStandaloneTransaction(transaction, transactionInfoDTO);
Assertions.assertEquals(AccountAddressRestrictionFlags.ALLOW_INCOMING_ADDRESS, transaction.getRestrictionFlags());
Assertions.assertEquals(1, transaction.getRestrictionAdditions().size());
Assertions.assertEquals(MapperUtils.toAddress("90DD539FC43C3703715A7445EA9188544F9086BC93A22465"), transaction.getRestrictionAdditions().get(0));
Assertions.assertEquals(MapperUtils.toAddress("9067C932B35C128FB23AAD0153036FF8DA44E52448D2E633"), transaction.getRestrictionDeletions().get(0));
}
Aggregations