Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

TestDriver

public interface TestDriver

androidx.work.test.TestDriver


Additional functionality exposed for WorkManager that are useful in the context of testing.

Summary

Public methods

abstract void setAllConstraintsMet(UUID workSpecId)

Tells TestDriver to pretend that all constraints on the Worker with the given workSpecId are met.

Public methods

setAllConstraintsMet

public abstract void setAllConstraintsMet (UUID workSpecId)

Tells TestDriver to pretend that all constraints on the Worker with the given workSpecId are met. The Worker is scheduled for execution.

Parameters
workSpecId UUID: is the Workers id.