WEB开发网
开发学院手机开发Android 开发 Android-Junit-TestCase-ClassLoader 讨论下Andro... 阅读

Android-Junit-TestCase-ClassLoader 讨论下Android的单元测试

 2010-08-21 06:18:00 来源:WEB开发网   
核心提示:import android.net.Uri;import android.os.Bundle;public class MockCursor implements Cursor {private String [][] dump = new String [][] {{"kkkk", "

import android.net.Uri;

import android.os.Bundle;

public class MockCursor implements Cursor {

private String [][] dump = new String [][] {

{"kkkk", "2222"},

{"aaaa", "3333"}

};

……………………

…………

……

}

import android.content.ContentResolver;

import android.database.CharArrayBuffer;

import android.database.ContentObserver;

import android.database.Cursor;

import android.database.DataSetObserver;

import android.net.Uri;

import android.os.Bundle;

public class MockCursor implements Cursor {

private String [][] dump = new String [][] {

{"kkkk", "2222"},

{"aaaa", "3333"}

};

……………………

…………

……

}

Manifest.xml

Java代码

< ?xml version="1.0" encoding="utf-8"?>

< manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.demo.contact.test" android:versionCode="1"

android:versionName="1.0">

< application android:icon="@drawable/icon" android:label="@string/app_name">

< uses-library android:name="android.test.runner" />

< /application>

< uses-sdk android:minSdkVersion="7" />

< instrumentation android:targetPackage="com.demo.contact"

android:name="android.test.InstrumentationTestRunner" />

< /manifest>

< ?xml version="1.0" encoding="utf-8"?>

< manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.demo.contact.test" android:versionCode="1"

android:versionName="1.0">

< application android:icon="@drawable/icon" android:label="@string/app_name">

上一页  1 2 3 4  下一页

Tags:Android Junit TestCase

编辑录入:coldstar [复制链接] [打 印]
赞助商链接