BundleJUnitUtils
Artifact: androidx.test:runner
public final class BundleJUnitUtils
Utility methods to turn JUnit objects into bundles holding imitations that can be used by androidx.test.orchestrator.AndroidTestOrchestrator.
Summary
Public methods |
|
|---|---|
static Bundle |
getBundleFromDescription(Description description) |
static Bundle |
getBundleFromFailure(Failure failure) |
static Bundle |
getBundleFromResult(Result result) |
static Bundle |
getBundleFromThrowable(Description description, Throwable throwable)Generates a bundle from a description and a given error. |
static ParcelableDescription |
getDescription(Bundle bundle) |
static ParcelableFailure |
getFailure(Bundle bundle) |
static ParcelableResult |
Public methods
getBundleFromThrowable
public static Bundle getBundleFromThrowable(Description description, Throwable throwable)
Generates a bundle from a description and a given error.
| Parameters | |
|---|---|
Description description |
A JUnit Description of the test |
Throwable throwable |
The root exception cause |
| Returns | |
|---|---|
Bundle |
A bundle containing a ParcelableFailure constructed from the description and throwable |