Search in sources :

Example 21 with RepositoryFactory

use of io.nem.symbol.sdk.api.RepositoryFactory in project nem2-sdk-java by nemtech.

the class MerkleLoaderIntegrationTest method mosaics.

public List<Arguments> mosaics() {
    RepositoryFactory repositoryFactory = getRepositoryFactory(DEFAULT_REPOSITORY_TYPE);
    MosaicRepository repository = repositoryFactory.createMosaicRepository();
    return getArguments(repository, new MosaicSearchCriteria().order(ORDER_BY));
}
Also used : RestrictionMosaicRepository(io.nem.symbol.sdk.api.RestrictionMosaicRepository) MosaicRepository(io.nem.symbol.sdk.api.MosaicRepository) RepositoryFactory(io.nem.symbol.sdk.api.RepositoryFactory) MosaicSearchCriteria(io.nem.symbol.sdk.api.MosaicSearchCriteria)

Example 22 with RepositoryFactory

use of io.nem.symbol.sdk.api.RepositoryFactory in project nem2-sdk-java by nemtech.

the class MerkleLoaderIntegrationTest method mosaicRestriction.

public List<Arguments> mosaicRestriction() {
    RepositoryFactory repositoryFactory = getRepositoryFactory(DEFAULT_REPOSITORY_TYPE);
    RestrictionMosaicRepository repository = repositoryFactory.createRestrictionMosaicRepository();
    return getArguments(repository, new MosaicRestrictionSearchCriteria());
}
Also used : RestrictionMosaicRepository(io.nem.symbol.sdk.api.RestrictionMosaicRepository) RepositoryFactory(io.nem.symbol.sdk.api.RepositoryFactory) MosaicRestrictionSearchCriteria(io.nem.symbol.sdk.api.MosaicRestrictionSearchCriteria)

Example 23 with RepositoryFactory

use of io.nem.symbol.sdk.api.RepositoryFactory in project nem2-sdk-java by nemtech.

the class MerkleLoaderIntegrationTest method secretLocks.

public List<Arguments> secretLocks() {
    RepositoryFactory repositoryFactory = getRepositoryFactory(DEFAULT_REPOSITORY_TYPE);
    SecretLockRepository repository = repositoryFactory.createSecretLockRepository();
    return getArguments(repository, new SecretLockSearchCriteria().order(ORDER_BY));
}
Also used : SecretLockSearchCriteria(io.nem.symbol.sdk.api.SecretLockSearchCriteria) SecretLockRepository(io.nem.symbol.sdk.api.SecretLockRepository) RepositoryFactory(io.nem.symbol.sdk.api.RepositoryFactory)

Example 24 with RepositoryFactory

use of io.nem.symbol.sdk.api.RepositoryFactory in project nem2-sdk-java by nemtech.

the class MerkleLoaderIntegrationTest method multisigMerkles.

@Test
void multisigMerkles() {
    RepositoryFactory repositoryFactory = getRepositoryFactory(DEFAULT_REPOSITORY_TYPE);
    MultisigAccountInfo state = get(repositoryFactory.createMultisigRepository().getMultisigAccountInfo(Address.createFromRawAddress("TCFAEINOWAAPSGT2OCBCZYMH2Q3PGHQPEYTIUKI")));
    StateProofServiceImpl service = new StateProofServiceImpl(repositoryFactory);
    StateMerkleProof<MultisigAccountInfo> proof = get(service.multisig(state));
    Assertions.assertTrue(proof.isValid(), "Invalid proof " + proof.getState().getAccountAddress().plain());
}
Also used : MultisigAccountInfo(io.nem.symbol.sdk.model.account.MultisigAccountInfo) RepositoryFactory(io.nem.symbol.sdk.api.RepositoryFactory) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 25 with RepositoryFactory

use of io.nem.symbol.sdk.api.RepositoryFactory in project nem2-sdk-java by nemtech.

the class MerkleLoaderIntegrationTest method accounts.

public List<Arguments> accounts() {
    RepositoryFactory repositoryFactory = getRepositoryFactory(DEFAULT_REPOSITORY_TYPE);
    AccountRepository repository = repositoryFactory.createAccountRepository();
    return getArguments(repository, new AccountSearchCriteria().order(ORDER_BY));
}
Also used : AccountSearchCriteria(io.nem.symbol.sdk.api.AccountSearchCriteria) AccountRepository(io.nem.symbol.sdk.api.AccountRepository) RestrictionAccountRepository(io.nem.symbol.sdk.api.RestrictionAccountRepository) RepositoryFactory(io.nem.symbol.sdk.api.RepositoryFactory)

Aggregations

RepositoryFactory (io.nem.symbol.sdk.api.RepositoryFactory)44 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)19 EnumSource (org.junit.jupiter.params.provider.EnumSource)16 Test (org.junit.jupiter.api.Test)11 BeforeEach (org.junit.jupiter.api.BeforeEach)7 RepositoryFactoryConfiguration (io.nem.symbol.sdk.api.RepositoryFactoryConfiguration)6 Account (io.nem.symbol.sdk.model.account.Account)6 BigInteger (java.math.BigInteger)6 Listener (io.nem.symbol.sdk.api.Listener)5 MetadataRepository (io.nem.symbol.sdk.api.MetadataRepository)5 NamespaceRepository (io.nem.symbol.sdk.api.NamespaceRepository)5 RestrictionMosaicRepository (io.nem.symbol.sdk.api.RestrictionMosaicRepository)5 NetworkCurrencies (io.nem.symbol.sdk.model.mosaic.NetworkCurrencies)5 MosaicRestrictionSearchCriteria (io.nem.symbol.sdk.api.MosaicRestrictionSearchCriteria)4 CosignatureSignedTransaction (io.nem.symbol.sdk.model.transaction.CosignatureSignedTransaction)4 SignedTransaction (io.nem.symbol.sdk.model.transaction.SignedTransaction)4 CurrencyService (io.nem.symbol.sdk.api.CurrencyService)3 MetadataTransactionService (io.nem.symbol.sdk.api.MetadataTransactionService)3 TransactionRepository (io.nem.symbol.sdk.api.TransactionRepository)3 TransactionService (io.nem.symbol.sdk.api.TransactionService)3