Search in sources :

Example 6 with SecretLockSearchCriteria

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

the class SecretLockRepositoryIntegrationTest method searchWhenInvalidAddress.

@ParameterizedTest
@EnumSource(RepositoryType.class)
void searchWhenInvalidAddress(RepositoryType type) {
    SecretLockRepository repository = getRepositoryFactory(type).createSecretLockRepository();
    Address address = Address.generateRandom(getNetworkType());
    Page<SecretLockInfo> page = get(repository.search(new SecretLockSearchCriteria().address(address)));
    Assertions.assertTrue(page.isLast());
    Assertions.assertTrue(page.getData().isEmpty());
    Assertions.assertEquals(20, page.getPageSize());
}
Also used : SecretLockSearchCriteria(io.nem.symbol.sdk.api.SecretLockSearchCriteria) Address(io.nem.symbol.sdk.model.account.Address) SecretLockRepository(io.nem.symbol.sdk.api.SecretLockRepository) SecretLockInfo(io.nem.symbol.sdk.model.transaction.SecretLockInfo) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

SecretLockSearchCriteria (io.nem.symbol.sdk.api.SecretLockSearchCriteria)6 SecretLockInfo (io.nem.symbol.sdk.model.transaction.SecretLockInfo)5 SecretLockRepository (io.nem.symbol.sdk.api.SecretLockRepository)4 Address (io.nem.symbol.sdk.model.account.Address)3 MosaicId (io.nem.symbol.sdk.model.mosaic.MosaicId)3 Page (io.nem.symbol.sdk.api.Page)2 RepositoryFactory (io.nem.symbol.sdk.api.RepositoryFactory)2 LockHashAlgorithm (io.nem.symbol.sdk.model.transaction.LockHashAlgorithm)2 LockStatus (io.nem.symbol.sdk.model.transaction.LockStatus)2 SecretLockEntryDTO (io.nem.symbol.sdk.openapi.vertx.model.SecretLockEntryDTO)2 SecretLockInfoDTO (io.nem.symbol.sdk.openapi.vertx.model.SecretLockInfoDTO)2 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)2 ConvertUtils (io.nem.symbol.core.utils.ConvertUtils)1 MapperUtils (io.nem.symbol.core.utils.MapperUtils)1 OrderBy (io.nem.symbol.sdk.api.OrderBy)1 Account (io.nem.symbol.sdk.model.account.Account)1 MerkleStateInfo (io.nem.symbol.sdk.model.blockchain.MerkleStateInfo)1 Currency (io.nem.symbol.sdk.model.mosaic.Currency)1 Mosaic (io.nem.symbol.sdk.model.mosaic.Mosaic)1 SecretLockTransaction (io.nem.symbol.sdk.model.transaction.SecretLockTransaction)1