首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

ndroid junit入门(4)Service测试

2012-06-27 
ndroid junit入门(四)Service测试public class TestService extends ServiceTestCaseTService {public T

ndroid junit入门(四)Service测试

public class TestService extends ServiceTestCase<TService> {public TestService() {super(TService.class);}@Overrideprotected void setUp() throws Exception {super.setUp();}@SmallTestpublic void testPreconditions() {}/** * Test basic startup/shutdown of Service */@SmallTestpublic void testStartable() {Intent startIntent = new Intent();startIntent.setClass(getContext(), Test1Activity.class);startService(startIntent);}/** * Test binding to service */@MediumTestpublic void testBindable() {Intent startIntent = new Intent();startIntent.setClass(getContext(), Test1Activity.class);bindService(startIntent);}}

热点排行