use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldFailWhenNotTransactionType.
@Test
void shouldFailWhenNotTransactionType() {
TransactionInfoDTO transaction = new TransactionInfoDTO();
Assertions.assertEquals("Unknown error mapping transaction: IllegalArgumentException: Transaction cannot be mapped, object does not not have transaction type.\n" + "{}", Assertions.assertThrows(IllegalArgumentException.class, () -> map(transaction)).getMessage());
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateStandaloneTransferTransaction.
@Test
void shouldCreateStandaloneTransferTransaction() {
TransactionInfoDTO transferTransactionDTO = TestHelperOkHttp.loadTransactionInfoDTO("standaloneTransferTransaction.json");
Transaction transferTransaction = map(transferTransactionDTO);
validateStandaloneTransaction(transferTransaction, transferTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateStandaloneMosaicAddressRestrictionTransaction.
@Test
void shouldCreateStandaloneMosaicAddressRestrictionTransaction() {
TransactionInfoDTO mosaicAddressRestrictionTransactionDTO = TestHelperOkHttp.loadTransactionInfoDTO("standaloneMosaicAddressRestrictionTransaction.json");
Transaction mosaicAddressRestrictionTransaction = map(mosaicAddressRestrictionTransactionDTO);
validateStandaloneTransaction(mosaicAddressRestrictionTransaction, mosaicAddressRestrictionTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateAggregateSecretLockTransaction.
@Test
void shouldCreateAggregateSecretLockTransaction() {
TransactionInfoDTO aggregateSecretLockTransactionDTO = TestHelperOkHttp.loadTransactionInfoDTO("aggregateSecretLockTransaction.json");
Transaction aggregateSecretLockTransaction = map(aggregateSecretLockTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateSecretLockTransaction, aggregateSecretLockTransactionDTO);
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.TransactionInfoDTO in project nem2-sdk-java by nemtech.
the class TransactionMapperOkHttpTest method shouldCreateAggregateTransferTransactionUsingAlias.
@Test
void shouldCreateAggregateTransferTransactionUsingAlias() {
TransactionInfoDTO aggregateTransferTransactionDTO = TestHelperOkHttp.loadTransactionInfoDTO("aggregateTransferTransactionUsingAlias.json");
Transaction aggregateTransferTransaction = map(aggregateTransferTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateTransferTransaction, aggregateTransferTransactionDTO);
}
Aggregations