BundleJUnitUtils


public final class BundleJUnitUtils


Utility methods to turn JUnit objects into bundles holding imitations that can be used by .

Summary

Public methods

static Bundle
static Bundle
static Bundle
static Bundle
getBundleFromThrowable(Description description, Throwable throwable)

Generates a bundle from a description and a given error.

static ParcelableDescription
static ParcelableFailure
static ParcelableResult
getResult(Bundle bundle)

Public methods

getBundleFromDescription

public static Bundle getBundleFromDescription(Description description)

getBundleFromFailure

public static Bundle getBundleFromFailure(Failure failure)

getBundleFromResult

public static Bundle getBundleFromResult(Result result)

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

getDescription

public static ParcelableDescription getDescription(Bundle bundle)

getFailure

public static ParcelableFailure getFailure(Bundle bundle)

getResult

public static ParcelableResult getResult(Bundle bundle)