From 72e59bdcd0e246a0c036d130240dd1acd047837b Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Mon, 29 Jun 2020 08:57:41 -0500 Subject: [PATCH] Move RepeatTaskHelperTest to jvm tests --- .../astrid/repeats/RepeatTaskHelperTest.kt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) rename app/src/{androidTest => test}/java/com/todoroo/astrid/repeats/RepeatTaskHelperTest.kt (93%) diff --git a/app/src/androidTest/java/com/todoroo/astrid/repeats/RepeatTaskHelperTest.kt b/app/src/test/java/com/todoroo/astrid/repeats/RepeatTaskHelperTest.kt similarity index 93% rename from app/src/androidTest/java/com/todoroo/astrid/repeats/RepeatTaskHelperTest.kt rename to app/src/test/java/com/todoroo/astrid/repeats/RepeatTaskHelperTest.kt index bc447bf0e..a7514fab4 100644 --- a/app/src/androidTest/java/com/todoroo/astrid/repeats/RepeatTaskHelperTest.kt +++ b/app/src/test/java/com/todoroo/astrid/repeats/RepeatTaskHelperTest.kt @@ -7,8 +7,6 @@ import com.todoroo.astrid.alarms.AlarmService import com.todoroo.astrid.dao.TaskDaoBlocking import com.todoroo.astrid.data.Task import com.todoroo.astrid.gcal.GCalHelper -import dagger.hilt.android.testing.HiltAndroidTest -import dagger.hilt.android.testing.UninstallModules import org.junit.After import org.junit.Assert.assertEquals import org.junit.Before @@ -16,8 +14,6 @@ import org.junit.Test import org.mockito.InOrder import org.mockito.Mockito import org.tasks.LocalBroadcastManager -import org.tasks.injection.InjectingTestCase -import org.tasks.injection.ProductionModule import org.tasks.makers.TaskMaker.AFTER_COMPLETE import org.tasks.makers.TaskMaker.COMPLETION_TIME import org.tasks.makers.TaskMaker.DUE_TIME @@ -26,13 +22,10 @@ import org.tasks.makers.TaskMaker.RRULE import org.tasks.makers.TaskMaker.newTask import org.tasks.time.DateTime import java.text.ParseException -import javax.inject.Inject @SuppressLint("NewApi") -@UninstallModules(ProductionModule::class) -@HiltAndroidTest -class RepeatTaskHelperTest : InjectingTestCase() { - @Inject lateinit var taskDao: TaskDaoBlocking +class RepeatTaskHelperTest { + private lateinit var taskDao: TaskDaoBlocking private lateinit var localBroadcastManager: LocalBroadcastManager private lateinit var alarmService: AlarmService private lateinit var gCalHelper: GCalHelper @@ -40,9 +33,8 @@ class RepeatTaskHelperTest : InjectingTestCase() { private lateinit var mocks: InOrder @Before - override fun setUp() { - super.setUp() - + fun setUp() { + taskDao = Mockito.mock(TaskDaoBlocking::class.java) alarmService = Mockito.mock(AlarmService::class.java) gCalHelper = Mockito.mock(GCalHelper::class.java) localBroadcastManager = Mockito.mock(LocalBroadcastManager::class.java)