• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • Android系統單元測試方法(23)

    發表于:2011-06-30來源:未知作者:領測軟件測試網采編點擊數: 標簽:
    * public class TestNewActivity extends *ActivityInstrumentationTestCase2NewActivity{ * private Buttonbutton1= null ; * private Buttonbutton2= null ; * private NewActivitynewActivity= null ; * public T
  •     * public class TestNewActivity extends  
  •     *   ActivityInstrumentationTestCase2<NewActivity> {   
  •     * private Button button1 = null;   
  •     * private Button button2 = null;   
  •     * private NewActivity newActivity = null;   
  •     * public TestNewActivity() {   
  •     *   super("cc.androidos.activity", NewActivity.class);   
  •     *   //This first parameter should the Activity package   
  •     *   //if other , the junit give us the exception: unable resolve the activity   
  •     * }   
  •     *   
  •     * @Override  
  •     * protected void setUp() throws Exception {   
  •     *   String tag = "setUp";   
  •     *   Log.e(tag, "init all var....");   
  •     *   newActivity = getActivity();   
  •     *   button1 = (Button) newActivity.findViewById(R.id.Button01);   
  •     *   button2 = (Button) newActivity.findViewById(R.id.Button02);   
  •     * }   
  •     * /**
  •     *   * Testing the button is focused or not  
  •     *   */  
  •     * public  void testButtonFocus() {   
  •     *   String tag = "testButtonFocus";   
  •     *   Log.e(tag, "start the button focus...");   
  •     *   assertTrue("Button1 is focused", button1.isFocused());   
  •     *   Log.e(tag, "send the down key event...");   
  •     *   sendKeys(KeyEvent.KEYCODE_DPAD_DOWN);   
  •     *   assertTrue(

    原文轉自:http://www.kjueaiud.com

  • 老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>