@Deprecated public abstract class ProviderTestCase<T extends ContentProvider> extends InstrumentationTestCase
InstrumentationTestCase
, this provides some of the boiler plate in setUp()
and
tearDown()
.Constructor and Description |
---|
ProviderTestCase(Class<T> providerClass,
String providerAuthority)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
MockContentResolver |
getMockContentResolver()
Deprecated.
|
IsolatedContext |
getMockContext()
Deprecated.
|
T |
getProvider()
Deprecated.
|
static <T extends ContentProvider> |
newResolverWithContentProviderFromSql(Context targetContext,
Class<T> providerClass,
String authority,
String databaseName,
int databaseVersion,
String sql)
Deprecated.
|
protected void |
setUp()
Deprecated.
|
protected void |
tearDown()
Deprecated.
Tears down the environment for the test fixture.
|
getInstrumentation, injectInsrumentation, injectInstrumentation, launchActivity, launchActivityWithIntent, runTest, runTestOnUiThread, sendKeys, sendKeys, sendRepeatedKeys
public T getProvider()
protected void tearDown() throws Exception
Calls ContentProvider.shutdown()
on the
ContentProvider
represented by mProvider.
tearDown
in class InstrumentationTestCase
Exception
public MockContentResolver getMockContentResolver()
public IsolatedContext getMockContext()
public static <T extends ContentProvider> ContentResolver newResolverWithContentProviderFromSql(Context targetContext, Class<T> providerClass, String authority, String databaseName, int databaseVersion, String sql) throws IllegalAccessException, InstantiationException