请高人解释下,TestCase 是一个接口,为什么AndroidTestCase类用extends 而不是用 implements 呢?
最近没事,看看了看android源代码,发现有一个地方不理解,请高人解释下,TestCase 是一个接口,为什么AndroidTestCase 类用extends 而不是用 implements 呢?
/** * Extend this if you need to access Resources or other things that depend on Activity Context. */public class AndroidTestCase extends TestCase { protected Context mContext; private Context mTestContext; @Override protected void setUp() throws Exception { super.setUp(); }
@Deprecatedpublic interface TestCase extends Runnable{ /** * Called before run() is called. */ public void setUp(Context context); /** * Called after run() is called, even if run() threw an exception, but * not if setUp() threw an execption. */ public void tearDown();}