Skip to content

Commit 804030f

Browse files
committed
EmptyListViewTest: Instantiate view within each test method
1 parent 08ab3c2 commit 804030f

File tree

1 file changed

+4
-7
lines changed
  • uhabits-android/src/androidTest/java/org/isoron/uhabits/activities/habits/list/views

1 file changed

+4
-7
lines changed

uhabits-android/src/androidTest/java/org/isoron/uhabits/activities/habits/list/views/EmptyListViewTest.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,20 @@ class EmptyListViewTest : BaseViewTest() {
3535
}
3636

3737
private val path = "habits/list/EmptyListView"
38-
private val view: EmptyListView = EmptyListView(targetContext)
39-
40-
@Before
41-
override fun setUp() {
42-
super.setUp()
43-
measureView(view, dpToPixels(200), dpToPixels(200))
44-
}
4538

4639
@Test
4740
fun testRender_done() {
41+
val view = EmptyListView(targetContext)
4842
view.showDone()
43+
measureView(view, dpToPixels(200), dpToPixels(200))
4944
assertRenders(view, "$path/done.png")
5045
}
5146

5247
@Test
5348
fun testRender_empty() {
49+
val view = EmptyListView(targetContext)
5450
view.showEmpty()
51+
measureView(view, dpToPixels(200), dpToPixels(200))
5552
assertRenders(view, "$path/empty.png")
5653
}
5754
}

0 commit comments

Comments
 (0)