WorkManagerTestInitHelper

public final class WorkManagerTestInitHelper
extends Object

java.lang.Object
   ↳ androidx.work.testing.WorkManagerTestInitHelper


Helps initialize WorkManager for testing.

Summary

Public methods

static TestDriver getTestDriver(Context context)
static TestDriver getTestDriver()

This method is deprecated. Call getTestDriver(Context) instead.

static void initializeTestWorkManager(Context context)

Initializes a test WorkManager with a SynchronousExecutor.

static void initializeTestWorkManager(Context context, Configuration configuration)

Initializes a test WorkManager with a user-specified Configuration.

Inherited methods

Public methods

getTestDriver

public static TestDriver getTestDriver (Context context)

Parameters
context Context

Returns