Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 305 Bytes

File metadata and controls

15 lines (10 loc) · 305 Bytes

Android unit tests resources mock

    @Mock
    private lateinit var mockContextResources: Resources

    @Before
    fun init() {
        mockContextResources = mock()
        Mockito.`when`(mockContextResources.getString(ArgumentMatchers.anyInt())).thenReturn("mocked string")
    }