{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class BundleJUnitUtils
Utility methods to turn JUnit objects into bundles holding imitations that can be used by .
Public methods |
|
|---|---|
static @NonNull Bundle |
getBundleFromDescription(@NonNull Description description) |
static @NonNull Bundle |
getBundleFromFailure(@NonNull Failure failure) |
static @NonNull Bundle |
getBundleFromResult(@NonNull Result result) |
static @NonNull Bundle |
getBundleFromThrowable(Generates a bundle from a description and a given error. |
static @NonNull ParcelableDescription |
getDescription(@NonNull Bundle bundle) |
static @NonNull ParcelableFailure |
getFailure(@NonNull Bundle bundle) |
static @NonNull ParcelableResult |
|
@NonNull
public static Bundle getBundleFromDescription(@NonNull Description description)
@NonNull
public static Bundle getBundleFromThrowable(
@NonNull Description description,
@NonNull Throwable throwable
)
Generates a bundle from a description and a given error.
| Parameters | |
|---|---|
@NonNull Description description |
A JUnit Description of the test |
@NonNull Throwable throwable |
The root exception cause |
| Returns | |
|---|---|
Bundle |
A bundle containing a ParcelableFailure constructed from the description and throwable |