From 04f73faeda097117bd30ef6ce2d0d0d2a514e144 Mon Sep 17 00:00:00 2001 From: Florina Muntenescu Date: Sat, 13 Apr 2019 14:27:53 +0100 Subject: [PATCH] Fix SearchViewModelTest --- .../java/io/plaidapp/search/ui/SearchViewModelTest.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/search/src/test/java/io/plaidapp/search/ui/SearchViewModelTest.kt b/search/src/test/java/io/plaidapp/search/ui/SearchViewModelTest.kt index 49c2201e9..659f6d225 100644 --- a/search/src/test/java/io/plaidapp/search/ui/SearchViewModelTest.kt +++ b/search/src/test/java/io/plaidapp/search/ui/SearchViewModelTest.kt @@ -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 @@ -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() @@ -100,7 +102,7 @@ class FakeSearchDataSourceFactory : SearchDataSourceFactory { } } -class FakeDataSource : PlaidDataSource(dribbbleSource) { +class FakeDataSource : PlaidDataSource(sourceItem) { var result = Result.Success(emptyList())