|
|
|
@ -1,12 +1,8 @@
|
|
|
|
|
package com.todoroo.astrid.adapter
|
|
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
|
import androidx.test.core.app.ApplicationProvider
|
|
|
|
|
import com.natpryce.makeiteasy.MakeItEasy.with
|
|
|
|
|
import com.natpryce.makeiteasy.PropertyValue
|
|
|
|
|
import com.todoroo.astrid.core.BuiltInFilterExposer
|
|
|
|
|
import com.todoroo.astrid.dao.TaskDao
|
|
|
|
|
import org.tasks.data.entity.Task
|
|
|
|
|
import com.todoroo.astrid.service.TaskMover
|
|
|
|
|
import dagger.hilt.android.testing.HiltAndroidTest
|
|
|
|
|
import dagger.hilt.android.testing.UninstallModules
|
|
|
|
@ -15,10 +11,12 @@ import org.junit.Assert.assertEquals
|
|
|
|
|
import org.junit.Before
|
|
|
|
|
import org.junit.Test
|
|
|
|
|
import org.tasks.LocalBroadcastManager
|
|
|
|
|
import org.tasks.data.dao.CaldavDao
|
|
|
|
|
import org.tasks.data.dao.GoogleTaskDao
|
|
|
|
|
import org.tasks.data.TaskContainer
|
|
|
|
|
import org.tasks.data.TaskListQuery.getQuery
|
|
|
|
|
import org.tasks.data.dao.CaldavDao
|
|
|
|
|
import org.tasks.data.dao.GoogleTaskDao
|
|
|
|
|
import org.tasks.data.entity.Task
|
|
|
|
|
import org.tasks.filters.MyTasksFilter
|
|
|
|
|
import org.tasks.injection.InjectingTestCase
|
|
|
|
|
import org.tasks.injection.ProductionModule
|
|
|
|
|
import org.tasks.makers.TaskMaker.PARENT
|
|
|
|
@ -38,7 +36,7 @@ class OfflineSubtaskTest : InjectingTestCase() {
|
|
|
|
|
|
|
|
|
|
private lateinit var adapter: TaskAdapter
|
|
|
|
|
private val tasks = ArrayList<TaskContainer>()
|
|
|
|
|
private val filter = BuiltInFilterExposer.getMyTasksFilter(ApplicationProvider.getApplicationContext<Context>().resources)
|
|
|
|
|
private val filter = runBlocking { MyTasksFilter.create() }
|
|
|
|
|
private val dataSource = object : TaskAdapterDataSource {
|
|
|
|
|
override fun getItem(position: Int) = tasks[position]
|
|
|
|
|
|
|
|
|
|