diff --git a/uhabits-android/build.gradle.kts b/uhabits-android/build.gradle.kts index 912b5eb68..032c2115f 100644 --- a/uhabits-android/build.gradle.kts +++ b/uhabits-android/build.gradle.kts @@ -95,7 +95,7 @@ dependencies { androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0") androidTestImplementation("androidx.test:rules:1.5.0") - androidTestImplementation("org.mockito.kotlin:mockito-kotlin:2.2.11") + androidTestImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0") compileOnly("javax.annotation:jsr250-api:1.0") coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3") implementation("com.github.AppIntro:AppIntro:6.2.0") @@ -119,7 +119,7 @@ dependencies { kaptAndroidTest("com.google.dagger:dagger-compiler:$daggerVersion") testImplementation("com.google.dagger:dagger:$daggerVersion") testImplementation("junit:junit:4.13.2") - testImplementation("org.mockito.kotlin:mockito-kotlin:2.2.11") + testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0") } kapt { diff --git a/uhabits-core/build.gradle.kts b/uhabits-core/build.gradle.kts index dd86d53ed..2b4beec0f 100644 --- a/uhabits-core/build.gradle.kts +++ b/uhabits-core/build.gradle.kts @@ -61,7 +61,7 @@ kotlin { implementation("org.xerial:sqlite-jdbc:3.40.0.0") implementation("org.hamcrest:hamcrest:2.2") implementation("org.apache.commons:commons-io:1.3.2") - implementation("org.mockito.kotlin:mockito-kotlin:2.2.11") + implementation("org.mockito.kotlin:mockito-kotlin:4.1.0") implementation("org.junit.jupiter:junit-jupiter:5.8.1") } } diff --git a/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/ui/widgets/WidgetBehaviorTest.kt b/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/ui/widgets/WidgetBehaviorTest.kt index 27a1c8cba..e173cdb5e 100644 --- a/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/ui/widgets/WidgetBehaviorTest.kt +++ b/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/ui/widgets/WidgetBehaviorTest.kt @@ -32,7 +32,7 @@ import org.junit.Test import org.mockito.kotlin.mock import org.mockito.kotlin.reset import org.mockito.kotlin.verify -import org.mockito.kotlin.verifyZeroInteractions +import org.mockito.kotlin.verifyNoInteractions import org.mockito.kotlin.whenever class WidgetBehaviorTest : BaseUnitTest() { @@ -61,7 +61,7 @@ class WidgetBehaviorTest : BaseUnitTest() { CreateRepetitionCommand(habitList, habit, today, Entry.YES_MANUAL, "") ) verify(notificationTray).cancel(habit) - verifyZeroInteractions(preferences) + verifyNoInteractions(preferences) } @Test @@ -71,7 +71,7 @@ class WidgetBehaviorTest : BaseUnitTest() { CreateRepetitionCommand(habitList, habit, today, Entry.NO, "") ) verify(notificationTray).cancel(habit) - verifyZeroInteractions(preferences) + verifyNoInteractions(preferences) } @Test @@ -113,7 +113,7 @@ class WidgetBehaviorTest : BaseUnitTest() { CreateRepetitionCommand(habitList, habit, today, 600, "") ) verify(notificationTray).cancel(habit) - verifyZeroInteractions(preferences) + verifyNoInteractions(preferences) } @Test @@ -126,6 +126,6 @@ class WidgetBehaviorTest : BaseUnitTest() { CreateRepetitionCommand(habitList, habit, today, 400, "") ) verify(notificationTray).cancel(habit) - verifyZeroInteractions(preferences) + verifyNoInteractions(preferences) } }