Search in sources :

Example 31 with EnumSource

use of org.junit.jupiter.params.provider.EnumSource in project nem2-sdk-java by nemtech.

the class MosaicDefinitionTransactionIntegrationTest method aggregateMosaicSupplyChangeTransaction.

@ParameterizedTest
@EnumSource(RepositoryType.class)
void aggregateMosaicSupplyChangeTransaction(RepositoryType type) {
    MosaicId mosaicId = createMosaic(type);
    MosaicSupplyChangeTransaction mosaicSupplyChangeTransaction = MosaicSupplyChangeTransactionFactory.create(getNetworkType(), getDeadline(), mosaicId, MosaicSupplyChangeActionType.INCREASE, BigInteger.valueOf(12)).maxFee(maxFee).build();
    announceAggregateAndValidate(type, mosaicSupplyChangeTransaction, account);
}
Also used : MosaicSupplyChangeTransaction(io.nem.symbol.sdk.model.transaction.MosaicSupplyChangeTransaction) MosaicId(io.nem.symbol.sdk.model.mosaic.MosaicId) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 32 with EnumSource

use of org.junit.jupiter.params.provider.EnumSource in project nem2-sdk-java by nemtech.

the class MosaicMetadataIntegrationTest method searchIntegration.

// 
@ParameterizedTest
@EnumSource(RepositoryType.class)
void searchIntegration(RepositoryType type) {
    BigInteger key = MapperUtils.fromHexToBigInteger("000000000000000A");
    Address sourceAddress = Address.createFromEncoded("9852D5EAA9AB038151EEBDD34308B3B2B7D82B92955F298E");
    Address targetAddress = Address.createFromEncoded("9852D5EAA9AB038151EEBDD34308B3B2B7D82B92955F298E");
    MosaicId mosaicId = new MosaicId("213CED6E6BBA6689");
    MetadataType metadataType = MetadataType.MOSAIC;
    Page<Metadata> metadataPage = get(getRepositoryFactory(type).createMetadataRepository().search(new MetadataSearchCriteria().scopedMetadataKey(key).targetId(mosaicId).sourceAddress(sourceAddress).targetAddress(targetAddress).metadataType(metadataType)));
    System.out.println(type + "\n" + toJson(metadataPage));
}
Also used : MetadataSearchCriteria(io.nem.symbol.sdk.api.MetadataSearchCriteria) Address(io.nem.symbol.sdk.model.account.Address) MosaicId(io.nem.symbol.sdk.model.mosaic.MosaicId) MetadataType(io.nem.symbol.sdk.model.metadata.MetadataType) Metadata(io.nem.symbol.sdk.model.metadata.Metadata) BigInteger(java.math.BigInteger) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 33 with EnumSource

use of org.junit.jupiter.params.provider.EnumSource in project nem2-sdk-java by nemtech.

the class NetworkRepositoryIntegrationTest method getNetworkInfo.

@ParameterizedTest
@EnumSource(RepositoryType.class)
void getNetworkInfo(RepositoryType type) {
    NetworkInfo networkInfo = get(getNetworkRepository(type).getNetworkInfo());
    assertEquals(getNetworkType().getNetworkName(), networkInfo.getName());
    Assertions.assertNotNull(networkInfo.getDescription());
}
Also used : NetworkInfo(io.nem.symbol.sdk.model.network.NetworkInfo) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 34 with EnumSource

use of org.junit.jupiter.params.provider.EnumSource in project nem2-sdk-java by nemtech.

the class NetworkRepositoryIntegrationTest method getTransactionFees.

@ParameterizedTest
@EnumSource(RepositoryType.class)
void getTransactionFees(RepositoryType type) {
    TransactionFees transactionFees = get(getNetworkRepository(type).getTransactionFees());
    Assertions.assertNotNull(transactionFees.getAverageFeeMultiplier());
    Assertions.assertNotNull(transactionFees.getHighestFeeMultiplier());
    Assertions.assertNotNull(transactionFees.getLowestFeeMultiplier());
    Assertions.assertNotNull(transactionFees.getMedianFeeMultiplier());
    System.out.println(jsonHelper().prettyPrint(transactionFees));
}
Also used : TransactionFees(io.nem.symbol.sdk.model.network.TransactionFees) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 35 with EnumSource

use of org.junit.jupiter.params.provider.EnumSource in project nem2-sdk-java by nemtech.

the class NodeRepositoryIntegrationTest method getServerInfo.

@ParameterizedTest
@EnumSource(RepositoryType.class)
void getServerInfo(RepositoryType type) {
    ServerInfo serverInfo = get(getNodeRepository(type).getServerInfo());
    assertNotEquals("", serverInfo.getRestVersion());
    assertNotEquals("", serverInfo.getSdkVersion());
}
Also used : ServerInfo(io.nem.symbol.sdk.model.node.ServerInfo) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

EnumSource (org.junit.jupiter.params.provider.EnumSource)397 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)393 Account (io.nem.symbol.sdk.model.account.Account)40 TransferTransaction (io.nem.symbol.sdk.model.transaction.TransferTransaction)38 SignedTransaction (io.nem.symbol.sdk.model.transaction.SignedTransaction)34 Transaction (io.nem.symbol.sdk.model.transaction.Transaction)34 Address (io.nem.symbol.sdk.model.account.Address)30 AggregateTransaction (io.nem.symbol.sdk.model.transaction.AggregateTransaction)27 TransactionRepository (io.nem.symbol.sdk.api.TransactionRepository)26 TransactionSearchCriteria (io.nem.symbol.sdk.api.TransactionSearchCriteria)26 BigInteger (java.math.BigInteger)25 MosaicId (io.nem.symbol.sdk.model.mosaic.MosaicId)23 KernelTransaction (org.neo4j.kernel.api.KernelTransaction)23 EntityUpdates (org.neo4j.storageengine.api.EntityUpdates)21 RepositoryFactory (io.nem.symbol.sdk.api.RepositoryFactory)19 Path (java.nio.file.Path)18 ArrayList (java.util.ArrayList)16 Listener (io.nem.symbol.sdk.api.Listener)15 PlainMessage (io.nem.symbol.sdk.model.message.PlainMessage)15 NamespaceId (io.nem.symbol.sdk.model.namespace.NamespaceId)14