Skip to content

Commit

Permalink
Fix SearchViewModelTest
Browse files Browse the repository at this point in the history
  • Loading branch information
florina-muntenescu committed Apr 16, 2019
1 parent 003b9d4 commit 04f73fa
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import io.plaidapp.core.data.PlaidItem
import io.plaidapp.core.data.Result
import io.plaidapp.core.dribbble.data.DribbbleSourceItem
import io.plaidapp.core.data.SourceItem
import io.plaidapp.core.interfaces.PlaidDataSource
import io.plaidapp.core.interfaces.SearchDataSourceFactoriesRegistry
import io.plaidapp.core.interfaces.SearchDataSourceFactory
Expand Down Expand Up @@ -91,7 +91,9 @@ class SearchViewModelTest {
}
}

val dribbbleSource = DribbbleSourceItem("dribbble", true)
val sourceItem = object : SourceItem(
"query", 100, "name", 0, true, true
) {}

class FakeSearchDataSourceFactory : SearchDataSourceFactory {
var dataSource = FakeDataSource()
Expand All @@ -100,7 +102,7 @@ class FakeSearchDataSourceFactory : SearchDataSourceFactory {
}
}

class FakeDataSource : PlaidDataSource(dribbbleSource) {
class FakeDataSource : PlaidDataSource(sourceItem) {

var result = Result.Success(emptyList<PlaidItem>())

Expand Down

0 comments on commit 04f73fa

Please sign in to comment.