use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateAggregateAddressAliasTransaction.
@Test
void shouldCreateAggregateAddressAliasTransaction() {
TransactionInfoDTO aggregateTransferTransactionDTO = TestHelperOkHttp.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.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateAggregateMosaicMetadataTransaction.
@Test
void shouldCreateAggregateMosaicMetadataTransaction() {
TransactionInfoDTO aggregateTransferTransactionDTO = TestHelperOkHttp.loadTransactionInfoDTO("aggregateMosaicMetadataTransaction.json");
AggregateTransaction aggregateTransferTransaction = (AggregateTransaction) map(aggregateTransferTransactionDTO);
validateAggregateTransaction(aggregateTransferTransaction, aggregateTransferTransactionDTO);
MosaicMetadataTransaction transaction = (MosaicMetadataTransaction) aggregateTransferTransaction.getInnerTransactions().get(0);
Assertions.assertEquals("9103B60AAF27626883000000000000000000000000000000", transaction.getTargetAddress().encoded(transaction.getNetworkType()));
Assertions.assertEquals(1, transaction.getValueSizeDelta());
Assertions.assertEquals(new BigInteger("11529215046069664444"), transaction.getScopedMetadataKey());
Assertions.assertArrayEquals(StringEncoder.getBytes("This is the message for this account! 汉字89664"), transaction.getValue());
Assertions.assertEquals("0003070467832AAA", transaction.getTargetMosaicId().getIdAsHex());
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateStandaloneSubNamespaceCreationTransaction.
@Test
void shouldCreateStandaloneSubNamespaceCreationTransaction() {
TransactionInfoDTO namespaceCreationTransactionDTO = TestHelperOkHttp.loadTransactionInfoDTO("standaloneSubNamespaceCreationTransaction.json");
Transaction namespaceCreationTransaction = map(namespaceCreationTransactionDTO);
validateStandaloneTransaction(namespaceCreationTransaction, namespaceCreationTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateAggregateTransferTransaction.
@Test
void shouldCreateAggregateTransferTransaction() {
TransactionInfoDTO aggregateTransferTransactionDTO = TestHelperOkHttp.loadTransactionInfoDTO("aggregateTransferTransaction.json");
Transaction aggregateTransferTransaction = map(aggregateTransferTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateTransferTransaction, aggregateTransferTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateStandaloneMosaicSupplyChangeTransaction.
@Test
void shouldCreateStandaloneMosaicSupplyChangeTransaction() {
TransactionInfoDTO mosaicSupplyChangeTransactionDTO = TestHelperOkHttp.loadTransactionInfoDTO("standaloneMosaicSupplyChangeTransaction.json");
Transaction mosaicSupplyChangeTransaction = map(mosaicSupplyChangeTransactionDTO);
validateStandaloneTransaction(mosaicSupplyChangeTransaction, mosaicSupplyChangeTransactionDTO);
}
Aggregations