mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-01 15:23:54 +01:00
parent
988b83dc32
commit
c9dfc03a20
122 changed files with 328 additions and 287 deletions
|
|
@ -74,7 +74,7 @@ class LoginActivityUnitTests {
|
|||
|
||||
@Before
|
||||
fun setUp() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
MockitoAnnotations.openMocks(this)
|
||||
AppAdapter.set(TestAppAdapter())
|
||||
activity = Robolectric.buildActivity(LoginActivity::class.java).create().get()
|
||||
context = ApplicationProvider.getApplicationContext()
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import javax.inject.Named
|
|||
class LogoutClientTest {
|
||||
|
||||
@Mock @field:[Inject Named("commons-service")]
|
||||
internal var service: Service? = null
|
||||
lateinit var service: Service
|
||||
|
||||
@InjectMocks
|
||||
var logoutClient: LogoutClient? = null
|
||||
|
|
@ -27,7 +27,7 @@ class LogoutClientTest {
|
|||
@Before
|
||||
@Throws(Exception::class)
|
||||
fun setUp() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
MockitoAnnotations.openMocks(this)
|
||||
val mwQueryResponse = mock(MwQueryResponse::class.java)
|
||||
val mwQueryResult = mock(MwQueryResult::class.java)
|
||||
`when`(mwQueryResult!!.csrfToken()).thenReturn("test_token")
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class SessionManagerUnitTests {
|
|||
|
||||
@Before
|
||||
fun setUp() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
MockitoAnnotations.openMocks(this)
|
||||
accountManager = AccountManager.get(ApplicationProvider.getApplicationContext())
|
||||
shadowOf(accountManager).addAccount(account)
|
||||
sessionManager =
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class SignupActivityTest {
|
|||
|
||||
@Before
|
||||
fun setUp() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
MockitoAnnotations.openMocks(this)
|
||||
activity = Robolectric.buildActivity(SignupActivity::class.java).create().get()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class WikiAccountAuthenticatorServiceUnitTest {
|
|||
|
||||
@Before
|
||||
fun setUp() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
MockitoAnnotations.openMocks(this)
|
||||
service = WikiAccountAuthenticatorService()
|
||||
service.onBind(null)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class WikiAccountAuthenticatorUnitTest {
|
|||
|
||||
@Before
|
||||
fun setUp() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
MockitoAnnotations.openMocks(this)
|
||||
context = ApplicationProvider.getApplicationContext()
|
||||
authenticator = WikiAccountAuthenticator(context)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue