mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
EmptyListViewTest: Instantiate view within each test method
This commit is contained in:
@@ -35,23 +35,20 @@ class EmptyListViewTest : BaseViewTest() {
|
||||
}
|
||||
|
||||
private val path = "habits/list/EmptyListView"
|
||||
private val view: EmptyListView = EmptyListView(targetContext)
|
||||
|
||||
@Before
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
measureView(view, dpToPixels(200), dpToPixels(200))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRender_done() {
|
||||
val view = EmptyListView(targetContext)
|
||||
view.showDone()
|
||||
measureView(view, dpToPixels(200), dpToPixels(200))
|
||||
assertRenders(view, "$path/done.png")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRender_empty() {
|
||||
val view = EmptyListView(targetContext)
|
||||
view.showEmpty()
|
||||
measureView(view, dpToPixels(200), dpToPixels(200))
|
||||
assertRenders(view, "$path/empty.png")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user