@Documented @Inherited @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_BUILD_FOLDER |
static String |
DEFAULT_RES_FOLDER |
static String |
NONE |
| Modifier and Type | Optional Element and Description |
|---|---|
String |
abiSplit
The ABI split to use when locating resources and AndroidManifest.xml
|
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.
|
String |
buildDir
The directory where application files are created during the application build process.
|
Class<?> |
constants
Reference to the BuildConfig class created by the Gradle build system.
|
String[] |
instrumentedPackages
A list of instrumented packages, in addition to those that are already instrumented.
|
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 static final String DEFAULT_BUILD_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 abiSplit
You do not typically have to set this, unless you are utilizing the ABI split feature
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 String buildDir
If not specified, Robolectric defaults to build.
public abstract Class<?>[] shadows
public abstract String[] instrumentedPackages
public abstract String[] libraries
Copyright © 2016. All rights reserved.