diff --git a/feature_account_impl/src/test/java/jp/co/soramitsu/feature_account_impl/data/repository/CredentialsRepositoryTest.kt b/feature_account_impl/src/test/java/jp/co/soramitsu/feature_account_impl/data/repository/CredentialsRepositoryTest.kt index 25fcf3150..509f9d792 100644 --- a/feature_account_impl/src/test/java/jp/co/soramitsu/feature_account_impl/data/repository/CredentialsRepositoryTest.kt +++ b/feature_account_impl/src/test/java/jp/co/soramitsu/feature_account_impl/data/repository/CredentialsRepositoryTest.kt @@ -36,7 +36,6 @@ import io.mockk.every import io.mockk.just import io.mockk.mockk import io.mockk.mockkObject -import io.mockk.mockkStatic import io.mockk.runs import jp.co.soramitsu.common.account.SoraAccount import jp.co.soramitsu.common.logger.FirebaseWrapper @@ -44,14 +43,7 @@ import jp.co.soramitsu.common.util.CryptoAssistant import jp.co.soramitsu.common.util.json_decoder.JsonAccountsEncoder import jp.co.soramitsu.feature_account_api.domain.interfaces.CredentialsDatasource import jp.co.soramitsu.feature_blockexplorer_api.data.SoraConfigManager -//import jp.co.soramitsu.xsubstrate.encrypt.keypair.substrate.Sr25519Keypair -//import jp.co.soramitsu.xsubstrate.encrypt.keypair.substrate.SubstrateKeypairFactory -//import jp.co.soramitsu.xsubstrate.encrypt.mnemonic.Mnemonic -//import jp.co.soramitsu.xsubstrate.encrypt.mnemonic.MnemonicCreator -//import jp.co.soramitsu.xsubstrate.encrypt.seed.SeedFactory -//import jp.co.soramitsu.xsubstrate.encrypt.seed.substrate.SubstrateSeedFactory import jp.co.soramitsu.sora.substrate.runtime.RuntimeManager -import jp.co.soramitsu.sora.substrate.substrate.deriveSeed32 import jp.co.soramitsu.test_shared.MainCoroutineRule import jp.co.soramitsu.xsubstrate.encrypt.keypair.substrate.Sr25519Keypair import jp.co.soramitsu.xsubstrate.encrypt.keypair.substrate.SubstrateKeypairFactory @@ -108,7 +100,7 @@ class CredentialsRepositoryTest { mockkObject(MnemonicCreator) mockkObject(SubstrateKeypairFactory) mockkObject(FirebaseWrapper) - mockkStatic(SubstrateSeedFactory::deriveSeed) + mockkObject(SubstrateSeedFactory) val derivationResult = mockk() every { SubstrateSeedFactory.deriveSeed(any(), any()) } returns derivationResult every { SubstrateKeypairFactory.generate(any(), any()) } returns keypair diff --git a/sorasubstrate/src/test/java/jp/co/soramitsu/sora/substrate/SendIntegrationTest.kt b/sorasubstrate/src/test/java/jp/co/soramitsu/sora/substrate/SendIntegrationTest.kt index d07096307..756cc70f9 100644 --- a/sorasubstrate/src/test/java/jp/co/soramitsu/sora/substrate/SendIntegrationTest.kt +++ b/sorasubstrate/src/test/java/jp/co/soramitsu/sora/substrate/SendIntegrationTest.kt @@ -35,7 +35,6 @@ package jp.co.soramitsu.sora.substrate import androidx.arch.core.executor.testing.InstantTaskExecutorRule import com.google.gson.Gson import com.neovisionaries.ws.client.WebSocketFactory -import jp.co.soramitsu.xsubstrate.extensions.fromHex import jp.co.soramitsu.xsubstrate.runtime.definitions.types.fromByteArrayOrNull import jp.co.soramitsu.xsubstrate.runtime.metadata.module import jp.co.soramitsu.xsubstrate.runtime.metadata.storage @@ -46,18 +45,17 @@ import jp.co.soramitsu.xsubstrate.wsrpc.executeAsync import jp.co.soramitsu.xsubstrate.wsrpc.logging.Logger import jp.co.soramitsu.xsubstrate.wsrpc.mappers.nonNull import jp.co.soramitsu.xsubstrate.wsrpc.mappers.pojo -import jp.co.soramitsu.xsubstrate.wsrpc.mappers.scale import jp.co.soramitsu.xsubstrate.wsrpc.recovery.Reconnector import jp.co.soramitsu.xsubstrate.wsrpc.request.RequestExecutor import jp.co.soramitsu.xsubstrate.wsrpc.request.runtime.RuntimeRequest import jp.co.soramitsu.sora.substrate.runtime.Constants import jp.co.soramitsu.sora.substrate.runtime.Pallete import jp.co.soramitsu.test_shared.TestRuntimeProvider +import jp.co.soramitsu.xcrypto.util.fromHex import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.After import org.junit.Assert.assertEquals -import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Ignore import org.junit.Rule diff --git a/sorasubstrate/src/test/java/jp/co/soramitsu/sora/substrate/SubstrateApiTest.kt b/sorasubstrate/src/test/java/jp/co/soramitsu/sora/substrate/SubstrateApiTest.kt index dbc39f555..b142c39e6 100644 --- a/sorasubstrate/src/test/java/jp/co/soramitsu/sora/substrate/SubstrateApiTest.kt +++ b/sorasubstrate/src/test/java/jp/co/soramitsu/sora/substrate/SubstrateApiTest.kt @@ -32,12 +32,12 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package jp.co.soramitsu.sora.substrate -import jp.co.soramitsu.xsubstrate.extensions.fromHex import jp.co.soramitsu.xsubstrate.runtime.RuntimeSnapshot import jp.co.soramitsu.xsubstrate.wsrpc.SocketService import jp.co.soramitsu.sora.substrate.runtime.RuntimeManager import jp.co.soramitsu.sora.substrate.substrate.SubstrateApiImpl import jp.co.soramitsu.test_shared.RealRuntimeProvider +import jp.co.soramitsu.xcrypto.util.fromHex import kotlinx.coroutines.test.runTest import org.junit.Assert.assertEquals import org.junit.Before diff --git a/test_shared/build.gradle b/test_shared/build.gradle index f13ec7761..d26d2c75a 100644 --- a/test_shared/build.gradle +++ b/test_shared/build.gradle @@ -29,7 +29,7 @@ dependencies { api coroutineTestDep api gsonDep -// api sharedUtilsDep + api xsubstrateDep api jUnitDep api mockitoDep