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

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

c# - Populating Gridview inside Listview ItemTemplate On Web User Control from Code Behind -