Skip to content

Commit 42246bf

Browse files
committed
CategoriesModelTest: use lateinit wherever possible
1 parent d977190 commit 42246bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/test/kotlin/fr/free/nrw/commons/category/CategoriesModelTest.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class CategoriesModelTest {
2121
internal var categoryItem: CategoryItem? = null
2222

2323
@Spy
24-
internal var gson: Gson? = Gson()
24+
internal lateinit var gson: Gson
2525

2626
@Spy
27-
internal var categoryItemForMethodA: CategoryItem? = CategoryItem("",false)
27+
internal lateinit var categoryItemForMethodA: CategoryItem
2828

2929
@Mock
3030
internal var categoryDao: CategoryDao? = null
@@ -38,6 +38,8 @@ class CategoriesModelTest {
3838
@Before
3939
@Throws(Exception::class)
4040
fun setUp() {
41+
gson = Gson()
42+
categoryItemForMethodA = CategoryItem("",false)
4143
MockitoAnnotations.initMocks(this)
4244
}
4345

0 commit comments

Comments
 (0)