TestCaseInfo


public final class TestCaseInfo implements Parcelable


Represents a parcelable TestCase. Contains all the information for a test case. Each test method inside a Java test is considered a separate TestCaseInfo. The TestCaseInfo is used to serialize and send Java test case information between the test runner and the remote androidx.test.services.events.run.ITestRunEvent and Android Services.

See Android Parcelable.

Summary

Constants

static final Parcelable.Creator<TestCaseInfo>

Public fields

final @NonNull List<AnnotationInfo>

Annotations on the test class.

final @NonNull String

Name of the test class.

final @NonNull List<AnnotationInfo>

Annotations on the test method.

final @NonNull String

Name of the test method.

Public constructors

Creates an AnnotationInfo from an Android Parcel.

TestCaseInfo(
    @NonNull String className,
    @NonNull String methodName,
    @NonNull List<AnnotationInfo> methodAnnotations,
    @NonNull List<AnnotationInfo> classAnnotations
)

Creates a TestCaseInfo.

Public methods

int
@NonNull String
void
writeToParcel(Parcel parcel, int i)

Inherited Constants

From android.os.Parcelable
static final int
static final int

Constants

CREATOR

public static final Parcelable.Creator<TestCaseInfoCREATOR

Public fields

classAnnotations

public final @NonNull List<AnnotationInfoclassAnnotations

Annotations on the test class.

className

public final @NonNull String className

Name of the test class.

methodAnnotations

public final @NonNull List<AnnotationInfomethodAnnotations

Annotations on the test method.

methodName

public final @NonNull String methodName

Name of the test method.

Public constructors

TestCaseInfo

public TestCaseInfo(@NonNull Parcel source)

Creates an AnnotationInfo from an Android Parcel.

Parameters
@NonNull Parcel source

Android Parcel to read from

TestCaseInfo

public TestCaseInfo(
    @NonNull String className,
    @NonNull String methodName,
    @NonNull List<AnnotationInfo> methodAnnotations,
    @NonNull List<AnnotationInfo> classAnnotations
)

Creates a TestCaseInfo.

Parameters
@NonNull String className

Name of the test class

@NonNull String methodName

Name of the test method

@NonNull List<AnnotationInfo> methodAnnotations

Annotations on the test method

@NonNull List<AnnotationInfo> classAnnotations

Annotations on the test class

Public methods

describeContents

public int describeContents()

getClassAndMethodName

public @NonNull String getClassAndMethodName()

writeToParcel

public void writeToParcel(Parcel parcel, int i)