首页>代码>android studio首次demo案例>/work/app/src/androidTest/java/com/example/administrator/myapplication/ExampleInstrumentedTest.java
package com.example.administrator.myapplication; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.administrator.myapplication", appContext.getPackageName()); } }
最近下载更多
最近浏览更多
时光凉薄 LV2
4月22日
666ing LV2
2023年12月27日
lyq6666666 LV5
2023年10月23日
hulifoxchen LV2
2023年9月25日
yongwanjiushanle
2023年9月25日
暂无贡献等级
dzlwindy LV8
2023年8月28日
微信网友_6533668927885312
2023年6月28日
暂无贡献等级
小妹妹 LV7
2023年6月9日
111112222333312131 LV4
2023年5月30日
qazwer11 LV5
2023年5月18日