File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/src/test/java/com/nextcloud/client/logger/ui Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import org.junit.runner.RunWith
2727import org.junit.runners.Suite
2828import org.mockito.MockitoAnnotations
2929import org.mockito.kotlin.any
30+ import org.mockito.kotlin.anyVararg
3031import org.mockito.kotlin.mock
3132import org.mockito.kotlin.whenever
3233import java.util.Date
@@ -77,7 +78,7 @@ class LogsViewModelTest {
7778
7879 @Before
7980 fun setUpFixture () {
80- MockitoAnnotations .initMocks (this )
81+ MockitoAnnotations .openMocks (this )
8182 context = mock()
8283 clock = mock()
8384 repository = TestLogRepository ()
@@ -204,7 +205,8 @@ class LogsViewModelTest {
204205 @Test
205206 fun `filtered logs are displayed` () {
206207 var statusArgs: Array <Any > = emptyArray()
207- whenever(context.getString(any(), any())).thenAnswer {
208+ // whenever(context.applicationContext).thenReturn(context)
209+ whenever(context.getString(any(), anyVararg())).thenAnswer {
208210 statusArgs = it.arguments
209211 " ${it.arguments} "
210212 }
You can’t perform that action at this time.
0 commit comments