@Documented @Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) public @interface Config
| Modifier and Type | Fields and Description |
|---|---|
static String |
DEFAULT |
static String |
DEFAULT_ASSET_FOLDER |
static String |
DEFAULT_RES_FOLDER |
static String |
NONE |
| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends android.app.Application> |
application
The
Application class to use in the test, this takes precedence over any application
specified in the AndroidManifest.xml. |
String |
assetDir
The directory from which to load assets.
|
Class<?> |
constants
Reference to the BuildConfig class created by the Gradle build system.
|
String[] |
libraries
A list of folders containing Android Libraries on which this project depends.
|
String |
manifest
The Android manifest file to load; Robolectric will look relative to the current directory.
|
String |
packageName
Java package name where the "R.class" file is located.
|
String |
qualifiers
Qualifiers for the resource resolution, such as "fr-normal-port-hdpi".
|
String |
resourceDir
The directory from which to load resources.
|
int[] |
sdk
The Android SDK level to emulate.
|
Class<?>[] |
shadows
A list of shadow classes to enable, in addition to those that are already present.
|
public static final String NONE
public static final String DEFAULT
public static final String DEFAULT_RES_FOLDER
public static final String DEFAULT_ASSET_FOLDER
public abstract int[] sdk
public abstract String manifest
AndroidManifest.xml.
If your project has no manifest or resources, use NONE.public abstract Class<?> constants
public abstract Class<? extends android.app.Application> application
Application class to use in the test, this takes precedence over any application
specified in the AndroidManifest.xml.Application class to use in the test.public abstract String packageName
applicationId associated with productFlavors or specify applicationIdSuffix
in your build.gradle.
If not specified, Robolectric defaults to the applicationId.
public abstract String qualifiers
public abstract String resourceDir
If not specified, Robolectric defaults to res.
public abstract String assetDir
If not specified, Robolectric defaults to assets.
public abstract Class<?>[] shadows
public abstract String[] libraries
Copyright © 2015. All rights reserved.