Fix tests
This commit is contained in:
parent
99d62381b9
commit
79540a8b9c
1 changed files with 9 additions and 8 deletions
|
@ -11,8 +11,7 @@ import androidx.test.core.app.ApplicationProvider
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
import androidx.test.filters.MediumTest
|
import androidx.test.filters.MediumTest
|
||||||
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
|
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
|
||||||
import org.hamcrest.MatcherAssert.assertThat
|
import org.junit.Assert
|
||||||
import org.hamcrest.Matchers.`is`
|
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
|
@ -156,15 +155,17 @@ class StreamItemAdapterTest {
|
||||||
) {
|
) {
|
||||||
spinner.setSelection(position)
|
spinner.setSelection(position)
|
||||||
spinner.adapter.getView(position, null, spinner).run {
|
spinner.adapter.getView(position, null, spinner).run {
|
||||||
assertThat(
|
Assert.assertEquals(
|
||||||
"normal visibility (pos=[$position])",
|
"normal visibility (pos=[$position]) is not correct",
|
||||||
findViewById<View>(R.id.wo_sound_icon).visibility, `is`(normalVisibility)
|
findViewById<View>(R.id.wo_sound_icon).visibility,
|
||||||
|
normalVisibility,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
spinner.adapter.getDropDownView(position, null, spinner).run {
|
spinner.adapter.getDropDownView(position, null, spinner).run {
|
||||||
assertThat(
|
Assert.assertEquals(
|
||||||
"drop down visibility (pos=[$position])",
|
"drop down visibility (pos=[$position]) is not correct",
|
||||||
findViewById<View>(R.id.wo_sound_icon).visibility, `is`(dropDownVisibility)
|
findViewById<View>(R.id.wo_sound_icon).visibility,
|
||||||
|
dropDownVisibility
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue