我有一个测试班,但总是进入NullPointerException
,tearDown()
有人知道为什么吗?
public class LaunchManagerActivityTest extends ActivityInstrumentationTestCase2<LaunchManagerActivity> {
private Solo solo;
public LaunchManagerActivityTest() {
super(LaunchManagerActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
solo = new Solo(getInstrumentation(), getActivity());
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
solo.finishOpenedActivities();
}
public void testOne() {
}
public void testTwo() {
}