Package org.robolectric.shadows
Class ShadowPausedAsyncTask<Params,Progress,Result>
- java.lang.Object
-
- org.robolectric.shadows.ShadowAsyncTask
-
- org.robolectric.shadows.ShadowPausedAsyncTask<Params,Progress,Result>
-
@Implements(value=android.os.AsyncTask.class, shadowPicker=Picker.class, isInAndroidSdk=false) public class ShadowPausedAsyncTask<Params,Progress,Result> extends ShadowAsyncTask
AAsyncTask
shadow forLooperMode.Mode.PAUSED
This is beta API, and will likely be renamed/removed in a future Robolectric release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowAsyncTask
ShadowAsyncTask.Picker
-
-
Constructor Summary
Constructors Constructor Description ShadowPausedAsyncTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AsyncTask<Params,Progress,Result>
executeOnExecutor(Executor exec, Params... params)
static void
overrideExecutor(Executor executor)
Globally override the executor used for all AsyncTask#execute* calls.static void
reset()
-
-
-
Method Detail
-
reset
@Resetter public static void reset()
-
executeOnExecutor
@Implementation protected AsyncTask<Params,Progress,Result> executeOnExecutor(Executor exec, Params... params)
-
overrideExecutor
public static void overrideExecutor(Executor executor)
Globally override the executor used for all AsyncTask#execute* calls.This can be useful if you want to use a more determinstic executor for tests, like
PausedExecutorService
orInlineExecutorService
.Use this API as a last resort. Its recommended instead to use dependency injection to provide a custom executor to AsyncTask#executeOnExecutor.
Beta API, may be removed or changed in a future Robolectric release
-
-