Deprecated API
Contents
-
Packages Package Description org.robolectric.shadows.httpclient
-
Interfaces Interface Description org.robolectric.res.FsFile UsePath
instead.org.robolectric.Robolectric.AttributeSetBuilder UseAttributeSetBuilder
instead.
-
Classes Class Description org.robolectric.android.controller.FragmentController Native Fragments have been deprecated in Android P. Android encourages developers to use androidx fragments, to test these use FragmentScenario.org.robolectric.android.util.concurrent.RoboExecutorService only works when used in conjunction with the deprecatedLooperMode.LEGACY
mode. Consider using guava'sMoreExecutors#directExecutor()
orPausedExecutorService
orInlineExecutorService
.org.robolectric.ConfigMerger Provide an implementation ofProvider
. This class will be removed in Robolectric 4.3.org.robolectric.fakes.BaseCursor UseMatrixCursor
instead.org.robolectric.fakes.RoboCursor UseMatrixCursor
instead.org.robolectric.internal.bytecode.InvokeDynamicClassInstrumentor The invoke-dynamic case has been moved to ClassInstrumentor. Classes previously extending this class should extendClassInstrumentor
directly.org.robolectric.internal.bytecode.ProxyMaker org.robolectric.internal.MavenManifestFactory This method of configuration will be removed in a forthcoming release. Build systems should follow http://robolectric.org/build-system-integration/ to provide integration with Robolectric.org.robolectric.MavenRoboSettings Don't put more stuff here.org.robolectric.RobolectricTestRunner.DeprecatedTestRunnerDefaultConfigProvider org.robolectric.RoboSettings Don't put more stuff here.org.robolectric.SdkPicker useDefaultSdkPicker
instead.org.robolectric.shadows.GnssStatusBuilder UseGnssStatus.Builder
instead where possible.org.robolectric.shadows.ShadowCrossProfileApps.StartedMainActivity org.robolectric.shadows.ShadowTelecomManager.CallRecord org.robolectric.util.FragmentTestUtil Please useRobolectric.buildFragment(Class)
instead. This will be removed in a forthcoming release,org.robolectric.util.SimpleFuture This class can introduce deadlocks, since its lock is held while invoking run().
-
Fields Field Description org.robolectric.res.android.AConfiguration.ACONFIGURATION_ORIENTATION_SQUARE Not currently supported or used.org.robolectric.res.android.AConfiguration.ACONFIGURATION_TOUCHSCREEN_STYLUS Not currently supported or used.org.robolectric.RuntimeEnvironment.application Please use {#getApplication} instead. Accessing this field directly is inherently incompatible withLazyApplication
and Robolectric makes no guarantees if a test *modifies* this field during execution.org.robolectric.RuntimeEnvironment.systemContext UseRuntimeEnvironment.getApplication()
instead. Note that unlike the alternative, this field is inherently incompatible withLazyApplication
. This field may be removed in a later releaseorg.robolectric.shadows.ShadowTelecomManager.CallRecord.bundle UseShadowTelecomManager.CallRecord.extras
instead.
-
Enum Constants Enum Constant Description org.robolectric.annotation.LooperMode.Mode.LEGACY use LooperMode.PAUSEDorg.robolectric.annotation.TextLayoutMode.Mode.LEGACY LEGACY mode is inaccurate, has known bugs and will be removed in a future release.org.robolectric.annotation.TextLayoutMode.Mode.REALISTIC REALTISTIC is the default mode and does not need to be stated explicity.
-
Annotation Type Elements Annotation Type Element Description org.robolectric.annotation.Config.assetDir() If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configureorg.robolectric.annotation.Config.libraries() If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configureorg.robolectric.annotation.Config.manifest() If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure builds http://robolectric.org/getting-started/org.robolectric.annotation.Config.packageName() To change your package name please override the applicationId in your build system. Changing package name here is broken as the package name will no longer match the package name encoded in the arsc resources file. If you are looking to simulate another application you can create another applications Context usingContext.createPackageContext(String, int)
. Note that you must add this package toShadowPackageManager.addPackage(android.content.pm.PackageInfo)
first.org.robolectric.annotation.Config.resourceDir() If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure