android - Mockito Instrumentation Test -
i trying use mockito perform instrumentation testing in android.
@runwith(mockitojunitrunner.class) public class loginactivitytest { @mock private firebasedatabase firebasedatabase; @mock private firebaseauth firebaseauth; @mock private loginview view; @injectmocks private loginactivitypresenter presenter; @test public void validateinput() { assert.assertequals(2 + 2, 4); } } after running validateinput test, seeing "no tests found" , "empty test suite." able tell me doing wrong? works if write same code typical unit test class.
note: experimenting mockito , ui testing. acknowledge test presenter only.
you cannot run mockito tests on android, need activate android-compatible mock maker this. feature added mockito-android artifact. documented in mockito class.
Comments
Post a Comment