diff --git a/formula-android-compose/src/main/java/com/instacart/formula/android/compose/ComposeViewFactory.kt b/formula-android-compose/src/main/java/com/instacart/formula/android/compose/ComposeViewFactory.kt index 6c5b7678..9e994616 100644 --- a/formula-android-compose/src/main/java/com/instacart/formula/android/compose/ComposeViewFactory.kt +++ b/formula-android-compose/src/main/java/com/instacart/formula/android/compose/ComposeViewFactory.kt @@ -10,7 +10,7 @@ import com.instacart.formula.android.ViewFactory import com.jakewharton.rxrelay3.BehaviorRelay -abstract class ComposeViewFactory : ViewFactory { +abstract class ComposeViewFactory : ViewFactory { override fun create(inflater: LayoutInflater, container: ViewGroup?): FeatureView { val view = ComposeView(inflater.context) diff --git a/formula-android/src/test/java/com/instacart/formula/MockitoFormulaTest.kt b/formula-android/src/test/java/com/instacart/formula/MockitoFormulaTest.kt index 4af5a1c6..3aba8e80 100644 --- a/formula-android/src/test/java/com/instacart/formula/MockitoFormulaTest.kt +++ b/formula-android/src/test/java/com/instacart/formula/MockitoFormulaTest.kt @@ -1,11 +1,10 @@ package com.instacart.formula import com.google.common.truth.Truth.assertThat -import com.nhaarman.mockito_kotlin.mock -import com.nhaarman.mockito_kotlin.spy -import com.nhaarman.mockito_kotlin.whenever import org.junit.Test import org.mockito.internal.stubbing.answers.CallsRealMethods +import org.mockito.kotlin.mock +import org.mockito.kotlin.whenever class MockitoFormulaTest { diff --git a/formula-android/src/test/java/com/instacart/formula/android/ActivityStoreContextTest.kt b/formula-android/src/test/java/com/instacart/formula/android/ActivityStoreContextTest.kt index 1636951b..04c3dc5f 100644 --- a/formula-android/src/test/java/com/instacart/formula/android/ActivityStoreContextTest.kt +++ b/formula-android/src/test/java/com/instacart/formula/android/ActivityStoreContextTest.kt @@ -4,14 +4,14 @@ import androidx.fragment.app.FragmentActivity import androidx.lifecycle.Lifecycle import com.instacart.formula.android.internal.ActivityStoreContextImpl import com.jakewharton.rxrelay3.PublishRelay -import com.nhaarman.mockito_kotlin.mock -import com.nhaarman.mockito_kotlin.verify -import com.nhaarman.mockito_kotlin.verifyZeroInteractions -import com.nhaarman.mockito_kotlin.whenever import io.reactivex.rxjava3.core.Observable import kotlinx.parcelize.Parcelize import org.junit.Before import org.junit.Test +import org.mockito.kotlin.mock +import org.mockito.kotlin.verify +import org.mockito.kotlin.verifyNoInteractions +import org.mockito.kotlin.whenever class ActivityStoreContextTest { class FakeActivity : FragmentActivity() { @@ -58,7 +58,7 @@ class ActivityStoreContextTest { doSomething() } - verifyZeroInteractions(activity) + verifyNoInteractions(activity) } @Test fun `send event success`() { diff --git a/formula-android/src/test/java/com/instacart/formula/android/ActivityStoreFactoryTest.kt b/formula-android/src/test/java/com/instacart/formula/android/ActivityStoreFactoryTest.kt index 63b52031..5f1f0679 100644 --- a/formula-android/src/test/java/com/instacart/formula/android/ActivityStoreFactoryTest.kt +++ b/formula-android/src/test/java/com/instacart/formula/android/ActivityStoreFactoryTest.kt @@ -3,8 +3,8 @@ package com.instacart.formula.android import androidx.fragment.app.FragmentActivity import com.google.common.truth.Truth.assertThat import com.instacart.formula.android.internal.ActivityStoreFactory -import com.nhaarman.mockito_kotlin.mock import org.junit.Test +import org.mockito.kotlin.mock class ActivityStoreFactoryTest { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 700d37ea..137db217 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,6 +14,7 @@ espresso = "3.4.0" robolectric = "4.6.1" lint = "30.0.0" autoService = "1.0-rc7" +mockito = "5.1.0" [libraries] android-gradle = { module = "com.android.tools.build:gradle", version.ref = "android-gradle" } @@ -64,8 +65,8 @@ truth = { module = "com.google.truth:truth", version = "1.1.3" } junit = { module = "junit:junit", version = "4.13.2" } rxrelays = { module = "com.jakewharton.rxrelay3:rxrelay", version = "3.0.1" } -mockito-inline = { module = "org.mockito:mockito-inline", version = "3.12.4" } -mockito-kotlin = { module = "com.nhaarman:mockito-kotlin", version = "1.6.0" } +mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockito" } +mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockito" } lint-core = { module = "com.android.tools.lint:lint", version.ref = "lint" } lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" } diff --git a/samples/stopwatch-coroutines/build.gradle.kts b/samples/stopwatch-coroutines/build.gradle.kts index 13ef7f2d..c33b3cab 100644 --- a/samples/stopwatch-coroutines/build.gradle.kts +++ b/samples/stopwatch-coroutines/build.gradle.kts @@ -5,10 +5,10 @@ plugins { } android { - namespace = "com.instacart.formula.stopwatch.coroutines" + namespace = "com.instacart.formula.stopwatch" defaultConfig { - applicationId = "com.instacart.formula.stopwatch.coroutines" + applicationId = "com.instacart.formula.stopwatch" versionCode = 1 versionName = "1.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"