本文整理汇总了Java中android.support.test.InstrumentationRegistry.getTargetContext方法的典型用法代码示例。如果您正苦于以下问题:Java InstrumentationRegistry.getTargetContext方法的具体用法?Java InstrumentationRegistry.getTargetContext怎么用?Java InstrumentationRegistry.getTargetContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.test.InstrumentationRegistry
的用法示例。
在下文中一共展示了InstrumentationRegistry.getTargetContext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("me.anshulagarwal.expandablemenuoption.test", appContext.getPackageName());
}
示例2: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.crazydude.common.test", appContext.getPackageName());
}
示例3: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
mFaBoUsbManger = new FaBoUsbManager(appContext);
mFaBoUsbManger.setParameter(FaBoUsbConst.BAUNDRATE_115200);
mFaBoUsbManger.setListener(this);
mFaBoUsbManger.findDevice();
}
示例4: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.beraldo.twstreaming", appContext.getPackageName());
}
示例5: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("songify.akshaypall.com.songifymusicplayer", appContext.getPackageName());
}
示例6: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.theah64.coinhive.test", appContext.getPackageName());
}
示例7: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.zterry.itemcontainer", appContext.getPackageName());
}
示例8: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.simasteam.adsimasteam.test", appContext.getPackageName());
}
示例9: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("emeline.mysekai", appContext.getPackageName());
}
示例10: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.slobodanantonijevic.customtextviewexample", appContext.getPackageName());
}
示例11: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("baryberri.a3_6_gridlayout", appContext.getPackageName());
}
示例12: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public
void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.vivchar.rendererrecyclerviewadapter.test", appContext.getPackageName());
}
示例13: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("ru.radiomayak", appContext.getPackageName());
}
示例14: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.bignerdranch.android.criminalintent", appContext.getPackageName());
}
示例15: useAppContext
import android.support.test.InstrumentationRegistry; //导入方法依赖的package包/类
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.beiing.monthcalendar.test", appContext.getPackageName());
}