use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class VertxAggregateTransactionTest method shouldFindAccountInAsASignerOfTheTransaction.
@Test
void shouldFindAccountInAsASignerOfTheTransaction() {
TransactionInfoDTO aggregateTransferTransactionDTO = TestHelperVertx.loadTransactionInfoDTO("accountInAsASignerOfTheTransaction.json");
AggregateTransaction aggregateTransferTransaction = (AggregateTransaction) new GeneralTransactionMapper(jsonHelper).mapFromDto(aggregateTransferTransactionDTO);
assertTrue(aggregateTransferTransaction.signedByAccount(PublicAccount.createFromPublicKey("A5F82EC8EBB341427B6785C8111906CD0DF18838FB11B51CE0E18B5E79DFF630", networkType)));
assertTrue(aggregateTransferTransaction.signedByAccount(PublicAccount.createFromPublicKey("7681ED5023141D9CDCF184E5A7B60B7D466739918ED5DA30F7E71EA7B86EFF2D", networkType)));
assertFalse(aggregateTransferTransaction.signedByAccount(PublicAccount.createFromPublicKey("B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF", networkType)));
}
use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperVertxTest method shouldCreateAggregateRootNamespaceCreationTransaction.
@Test
void shouldCreateAggregateRootNamespaceCreationTransaction() {
TransactionInfoDTO aggregateNamespaceCreationTransactionDTO = TestHelperVertx.loadTransactionInfoDTO("aggregateRootNamespaceCreationTransaction.json");
Transaction aggregateNamespaceCreationTransaction = map(aggregateNamespaceCreationTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateNamespaceCreationTransaction, aggregateNamespaceCreationTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperVertxTest method shouldCreateAggregateAddressAliasTransaction.
@Test
void shouldCreateAggregateAddressAliasTransaction() {
TransactionInfoDTO aggregateTransferTransactionDTO = TestHelperVertx.loadTransactionInfoDTO("aggregateAddressAliasTransaction.json");
Transaction aggregateTransferTransaction = map(aggregateTransferTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateTransferTransaction, aggregateTransferTransactionDTO);
AddressAliasTransaction transaction = (AddressAliasTransaction) ((AggregateTransaction) aggregateTransferTransaction).getInnerTransactions().get(0);
Assertions.assertEquals("SDT4THYNVUQK2GM6XXYTWHZXSPE3AUA2GTDPM2Q", transaction.getAddress().plain());
Assertions.assertEquals(AliasAction.LINK, 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 shouldCreateAccountMosaicRestriction.
@Test
public void shouldCreateAccountMosaicRestriction() throws Exception {
TransactionInfoDTO transactionInfoDTO = TestHelperVertx.loadTransactionInfoDTO("accountMosaicRestrictionTransaction.json");
AccountMosaicRestrictionTransaction transaction = (AccountMosaicRestrictionTransaction) map(transactionInfoDTO);
validateStandaloneTransaction(transaction, transactionInfoDTO);
Assertions.assertEquals(AccountMosaicRestrictionFlags.ALLOW_INCOMING_MOSAIC, transaction.getRestrictionFlags());
Assertions.assertEquals(1, transaction.getRestrictionAdditions().size());
Assertions.assertEquals("00003646934825AA", transaction.getRestrictionAdditions().get(0).getIdAsHex());
}
use of io.nem.symbol.sdk.openapi.vertx.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperVertxTest method shouldCreateStandaloneMosaicCreationTransaction.
@Test
void shouldCreateStandaloneMosaicCreationTransaction() {
TransactionInfoDTO mosaicCreationTransactionDTO = TestHelperVertx.loadTransactionInfoDTO("standaloneMosaicCreationTransaction.json");
Transaction mosaicCreationTransaction = map(mosaicCreationTransactionDTO);
validateStandaloneTransaction(mosaicCreationTransaction, mosaicCreationTransactionDTO);
}
Aggregations