本文整理匯總了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());
}