?????????????Android???????????????????ò????????Android??ü??????????????????У?MVC????????????????????Android?????У????????ò?????MVC?????????Android??Widget??????????MVC??????????????£????????????ó????????????????????????Android?????????????в?????????????????????ó?????????????????Щ??????????????????????????Activity????????????????????Activity?У??????????????£????п?????????????μ????????????Android?????????????????????????£???????????????????????????????У??????????????????????????????????MVC???????Android??ó?????????????ó??????????????????????????????MVC?????????ó???????????????????δ????????????????????????????????е????????????????MVC?????????????????????????????????????????????????
????????????????????????????????????
??????????????Android?????????wkj??????????Android?????????WkjTest???????????????Android????????????????????????????Android???????????????
????????????д??????????????????????????????????????????MainActivity????????AppModel?????????????-??????????Android????????????????Hello World???????????????????AppModel?????????????????????Щ??????????????????????????????????д??????????????????????????????Щ??????????
??????WkjTest??????????????MainActivityTest???????????????android.test.ActivityInstrumentationTestCase2???????????????

 

package com.bjcic.wkj.test;
import com.bjcic.wkj.MainActivity;
import android.app.Activity;
import android.test.ActivityInstrumentationTestCase2;
import android.widget.TextView;
public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> {
public MainActivityTest() {
super(MainActivity.class);
}
/**
* ?????????????????????????е????
*/
@Override
protected void setUp() throws Exception {
super.setUp();
setActivityInitialTouchMode(false);
activity = getActivity();
}
/**
* ??????????????н??????????е????
*/
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
/**
* ????????????????????????
*/
public void testTemp001() {
titleTxtv = (TextView)activity.findViewById(com.bjcic.wkj.R.id.j_titleTxtv);
assertEquals(activity.getString(com.bjcic.wkj.R.string.welcome_msg)?? titleTxtv.getText());
}
private Activity activity = null;
private TextView titleTxtv = null;
}