java - 'assert' is ignored on Junit Tests with InstrumentationTestCase -


i set junit test android unit testing support , "fail" result following test class.

public class footest extends androidtestcase {     @before     public void setup() throws exception { super.setup(); }     @after     public void teardown() throws exception { super.teardown(); }     @test     public void testcase1() { asserttrue(false); }   } 

however, after replacing 'androidtestcase' 'instrumentationtestcase', got "success" result in spite of containing assertion returns 'fail'.

i know reason why had got such result, different super classes , how use context in junit framework tests.


Comments