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

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -