use of android.test.RenamingDelegatingContext in project WordPress-Android by wordpress-mobile.
the class GCMIntentServiceTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
FactoryUtils.initWithTestFactories();
mTargetContext = new RenamingDelegatingContext(getContext(), "test_");
TestUtils.clearApplicationState(mTargetContext);
setupService();
}
use of android.test.RenamingDelegatingContext in project WordPress-Android by wordpress-mobile.
the class DefaultMocksInstrumentationTestCase method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
FactoryUtils.initWithTestFactories();
mTargetContext = new RenamingDelegatingContext(getInstrumentation().getTargetContext(), "test_");
TestUtils.clearApplicationState(mTargetContext);
// Init contexts
RestClientFactoryTest.sContext = getInstrumentation().getContext();
AppLog.v(AppLog.T.TESTS, "Contexts set");
// Set mode to Customizable
RestClientFactoryTest.sMode = RestClientFactoryTest.Mode.CUSTOMIZABLE;
AppLog.v(AppLog.T.TESTS, "Modes set to customizable");
// Set default variant
RestClientFactoryTest.setPrefixAllInstances("default");
}
use of android.test.RenamingDelegatingContext in project WordPress-Android by wordpress-mobile.
the class FluxCMigrationTest method setUp.
@Override
protected void setUp() throws Exception {
// Needed for Mockito
System.setProperty("dexmaker.dexcache", getInstrumentation().getTargetContext().getCacheDir().getPath());
mRenamingTargetAppContext = new RenamingDelegatingContext(getInstrumentation().getTargetContext().getApplicationContext(), "test_");
mTestContext = getInstrumentation().getContext();
mSiteStore = new SiteStore(new Dispatcher(), Mockito.mock(SiteRestClient.class), Mockito.mock(SiteXMLRPCClient.class));
WellSqlConfig config = new TestWellSqlConfig(mRenamingTargetAppContext);
WellSql.init(config);
config.reset();
super.setUp();
}
use of android.test.RenamingDelegatingContext in project android_frameworks_base by crdroidandroid.
the class JobStoreTest method setUp.
@Override
public void setUp() throws Exception {
mTestContext = new RenamingDelegatingContext(getContext(), TEST_PREFIX);
Log.d(TAG, "Saving tasks to '" + mTestContext.getFilesDir() + "'");
mTaskStoreUnderTest = JobStore.initAndGetForTesting(mTestContext, mTestContext.getFilesDir());
mComponent = new ComponentName(getContext().getPackageName(), StubClass.class.getName());
}
use of android.test.RenamingDelegatingContext in project android-jigsaw-puzzle by julesbond007.
the class JigsawDBTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
RenamingDelegatingContext context = new RenamingDelegatingContext(getContext(), "test_");
db = new JigsawDB(context);
}
Aggregations