public class TestService extends ServiceTestCase<TService> {
public TestService() {
super(TService.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@SmallTest
public void testPreconditions() {
}
/**
* Test basic startup/shutdown of Service
*/
@SmallTest
public void testStartable() {
Intent startIntent = new Intent();
startIntent.setClass(getContext(), Test1Activity.class);
startService(startIntent);
}
/**
* Test binding to service
*/
@MediumTest
public void testBindable() {
Intent startIntent = new Intent();
startIntent.setClass(getContext(), Test1Activity.class);
bindService(startIntent);
}
}
ndroid junit入门(四)Service测试
最新推荐文章于 2022-04-20 16:06:37 发布