SendFilesDialogTest: assert adapter is not null

Just in case

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey Vilas 2022-01-13 09:06:09 +01:00
parent 9d856da33a
commit 53feb14714
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -80,7 +80,8 @@ class SendFilesDialogTest : AbstractIT() {
fun showDialog() {
val sut = showDialog(FILES_SAME_TYPE)
val recyclerview: RecyclerView = sut.requireDialog().findViewById(R.id.send_button_recycler_view)
Assert.assertNotEquals("Send button list is empty", 0, recyclerview.adapter?.itemCount)
Assert.assertNotNull("Adapter is null", recyclerview.adapter)
Assert.assertNotEquals("Send button list is empty", 0, recyclerview.adapter!!.itemCount)
}
@Test
@ -94,7 +95,8 @@ class SendFilesDialogTest : AbstractIT() {
fun showDialogDifferentTypes() {
val sut = showDialog(FILES_MIXED_TYPE)
val recyclerview: RecyclerView = sut.requireDialog().findViewById(R.id.send_button_recycler_view)
Assert.assertNotEquals("Send button list is empty", 0, recyclerview.adapter?.itemCount)
Assert.assertNotNull("Adapter is null", recyclerview.adapter)
Assert.assertNotEquals("Send button list is empty", 0, recyclerview.adapter!!.itemCount)
}
@Test