fixes unit tests (#5354)

* fixes unit tests

* fixes failing unit tests
This commit is contained in:
Srishti Rohatgi 2023-10-20 08:20:51 +05:30 committed by GitHub
parent 988b83dc32
commit c9dfc03a20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 328 additions and 287 deletions

View file

@ -57,7 +57,7 @@ class DeleteHelperTest {
*/
@Before
fun setup() {
MockitoAnnotations.initMocks(this)
MockitoAnnotations.openMocks(this)
deleteHelper = DeleteHelper(mock(), pageEditClient, mock(), "")
}

View file

@ -39,7 +39,7 @@ class ReasonBuilderTest {
@Before
@Throws(Exception::class)
fun setUp() {
MockitoAnnotations.initMocks(this)
MockitoAnnotations.openMocks(this)
val resources = mock(Resources::class.java)
`when`(resources!!.getString(anyInt())).thenReturn("test")
`when`(context!!.resources).thenReturn(resources)