WorkManagerTestInitHelper

class WorkManagerTestInitHelper
kotlin.Any
   ↳ androidx.work.test.WorkManagerTestInitHelper

Helps initialize androidx.work.WorkManager for testing.

Summary

Public methods
static Unit

Initializes androidx.work.WorkManager with a SynchronousExecutor.

static TestDriver!

Public methods

initializeTestWorkManager

static fun initializeTestWorkManager(context: Context): Unit

Initializes androidx.work.WorkManager with a SynchronousExecutor.

Parameters
context Context: The application Context

getTestDriver

static fun getTestDriver(): TestDriver!
Return
TestDriver!: An instance of TestDriver. This exposes additional functionality that are useful in the context of testing when using WorkManager.