use of io.nem.symbol.sdk.model.transaction.Transaction 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.model.transaction.Transaction 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.model.transaction.Transaction 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.model.transaction.Transaction 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.model.transaction.Transaction in project nem2-sdk-java by nemtech.
the class TransactionRepositoryVertxImplTest method shouldGetTransactionParial.
@Test
public void shouldGetTransactionParial() throws Exception {
TransactionInfoDTO transactionInfoDTO = TestHelperVertx.loadTransactionInfoDTO("aggregateMosaicCreationTransaction.json", TransactionInfoDTO.class);
String hash = jsonHelper.getString(transactionInfoDTO, "meta", "hash");
mockRemoteCall(transactionInfoDTO);
Transaction transaction = repository.getTransaction(TransactionGroup.PARTIAL, hash).toFuture().get();
Assertions.assertNotNull(transaction);
Assertions.assertEquals(hash, transaction.getTransactionInfo().get().getHash().get());
Assertions.assertEquals(TransactionGroup.PARTIAL, transaction.getGroup().get());
}
Aggregations