Skip to content

Commit

Permalink
Fix + simplify PagingSample test
Browse files Browse the repository at this point in the history
  • Loading branch information
dlam committed Feb 23, 2021
1 parent 082b600 commit e332b53
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion BasicRxJavaSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion BasicRxJavaSampleKotlin/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion BasicSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion GithubBrowserSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion LiveDataSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion MADSkillsNavigationSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion NavigationAdvancedSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion NavigationBasicSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import androidx.recyclerview.widget.RecyclerView
import androidx.test.core.app.ActivityScenario
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.hamcrest.CoreMatchers
import org.hamcrest.MatcherAssert
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import java.util.concurrent.TimeoutException
Expand All @@ -41,8 +40,7 @@ class MainActivityTest {

scenario.onActivity { activity ->
val recyclerView: RecyclerView = activity.binding.cheeseList
MatcherAssert.assertThat(recyclerView.adapter, CoreMatchers.notNullValue())
MatcherAssert.assertThat(recyclerView.adapter!!.itemCount > 0, CoreMatchers.`is`(true))
assertEquals(CHEESE_DATA.size, recyclerView.adapter!!.itemCount)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract class CheeseDb : RoomDatabase() {
}


private val CHEESE_DATA = arrayListOf(
val CHEESE_DATA = arrayListOf(
"Abbaye de Belloc", "Abbaye du Mont des Cats", "Abertam", "Abondance", "Ackawi",
"Acorn", "Adelost", "Affidelice au Chablis", "Afuega'l Pitu", "Airag", "Airedale",
"Aisy Cendre", "Allgauer Emmentaler", "Alverca", "Ambert", "American Cheese",
Expand Down
2 changes: 1 addition & 1 deletion PagingSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion PagingWithNetworkSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion PersistenceContentProviderSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion PersistenceMigrationsSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion ViewBindingSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion WorkManagerSample/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down
2 changes: 1 addition & 1 deletion versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ versions.mockito_android = "2.25.0"
versions.mockwebserver = "3.8.1"
versions.navigation = "2.3.0-alpha01"
versions.okhttp_logging_interceptor = "3.9.0"
versions.paging = "3.0.0-alpha13"
versions.paging = "3.0.0-beta01"
versions.recyclerview = "1.2.0-beta01"
versions.retrofit = "2.9.0"
versions.robolectric = "4.2"
Expand Down

0 comments on commit e332b53

Please sign in to comment.