Skip navigation links
A C D E F G H I J L M N O P S T V W Z 

A

AbstractZipSubject<T extends com.google.common.truth.Subject<T,java.io.File>> - Class in com.android.testutils.truth
Truth support for zip files.
AbstractZipSubject(FailureStrategy, File) - Constructor for class com.android.testutils.truth.AbstractZipSubject
 
AbstractZipSubject.ZipEntryAction<T> - Interface in com.android.testutils.truth
Perform an action on a Zip file entry.
actionStarted() - Method in class com.android.testutils.concurrency.InterProcessConcurrencyTester.MainProcessNotifier
Notifies the main process that the current client process starts executing the action under test.
addClassInvocationFromNewProcess(Class, String[]) - Method in class com.android.testutils.concurrency.InterProcessConcurrencyTester
Adds a new invocation of the class under test's main() method to this InterProcessConcurrencyTester instance.
addMethodInvocationFromNewThread(Consumer<Function<F, T>>, Function<F, T>) - Method in class com.android.testutils.concurrency.ConcurrencyTester
Adds a new invocation of the method under test to this ConcurrencyTester instance.
advanceBy(long, TimeUnit) - Method in class com.android.testutils.VirtualTimeScheduler
advanceBy will run all actions scheduled within the interval (converted to nanos) specified from the current time.
advanceBy(long) - Method in class com.android.testutils.VirtualTimeScheduler
advanceBy will run all actions scheduled within the interval specified from the current time.
advanceTo(long) - Method in class com.android.testutils.VirtualTimeScheduler
advanceTo will run all actions scheduled between CurrentTimeNanos and endTimeNanos.
assertThat(File) - Static method in class com.android.testutils.truth.MoreTruth
 
assertThat(Path) - Static method in class com.android.testutils.truth.MoreTruth
 
assertThat(FileRecord) - Static method in class com.android.testutils.truth.MoreTruth
 
assertThat(Optional<T>) - Static method in class com.android.testutils.truth.MoreTruth
 
assertThatActionsCannotRunConcurrently() - Method in class com.android.testutils.concurrency.ConcurrencyTester
Executes the invocations of the method under test in separate threads and asserts that all the actions ran sequentially.
assertThatActionsCannotRunConcurrently() - Method in class com.android.testutils.concurrency.InterProcessConcurrencyTester
Executes the invocations of the class under test's main() method in separate processes and asserts that all the actions ran sequentially.
assertThatActionsCanRunConcurrently() - Method in class com.android.testutils.concurrency.ConcurrencyTester
Executes the invocations of the method under test in separate threads and asserts that all the actions ran concurrently.
assertThatActionsCanRunConcurrently() - Method in class com.android.testutils.concurrency.InterProcessConcurrencyTester
Executes the invocations of the class under test's main() method in separate processes and asserts that all the actions ran concurrently.
assertThatDex(File) - Static method in class com.android.testutils.truth.MoreTruth
 
assertThatOnlyOneActionIsExecuted() - Method in class com.android.testutils.concurrency.ConcurrencyTester
Executes the invocations of the method under test in separate threads and asserts that one and only one of the actions was executed.
assertThatZip(File) - Static method in class com.android.testutils.truth.MoreTruth
 
awaitTermination(long, TimeUnit) - Method in class com.android.testutils.VirtualTimeScheduler
 

C

cancel(boolean) - Method in class com.android.testutils.VirtualTimeFuture
 
clear() - Method in class com.android.testutils.MockLog
 
close() - Method in class com.android.testutils.SystemPropertyOverrides
 
com.android.testutils - package com.android.testutils
 
com.android.testutils.concurrency - package com.android.testutils.concurrency
 
com.android.testutils.incremental - package com.android.testutils.incremental
 
com.android.testutils.truth - package com.android.testutils.truth
 
compareTo(Delayed) - Method in class com.android.testutils.VirtualTimeFuture
 
ConcurrencyTester<F,T> - Class in com.android.testutils.concurrency
Utility class to test concurrency.
ConcurrencyTester() - Constructor for class com.android.testutils.concurrency.ConcurrencyTester
 
contains(String) - Method in class com.android.testutils.truth.AbstractZipSubject
Asserts the zip file contains a file with the specified path.
contains(String) - Method in class com.android.testutils.truth.FileSubject
 
contains(byte[]) - Method in class com.android.testutils.truth.FileSubject
 
containsAllOf(String...) - Method in class com.android.testutils.truth.FileSubject
 
containsClass(String) - Method in class com.android.testutils.truth.DexBackedDexFileSubject
 
containsClass(String) - Method in class com.android.testutils.truth.DexFileSubject
 
containsClass(String) - Method in interface com.android.testutils.truth.DexSubject
 
containsClasses(String...) - Method in class com.android.testutils.truth.DexBackedDexFileSubject
 
containsClasses(String...) - Method in class com.android.testutils.truth.DexFileSubject
 
containsClasses(String...) - Method in interface com.android.testutils.truth.DexSubject
 
containsFileWithContent(String, String) - Method in class com.android.testutils.truth.AbstractZipSubject
Asserts the zip file contains a file with the specified String content.
containsFileWithContent(String, byte[]) - Method in class com.android.testutils.truth.AbstractZipSubject
Asserts the zip file contains a file with the specified byte array content.
containsFileWithMatch(String, String) - Method in class com.android.testutils.truth.AbstractZipSubject
 
containsFileWithoutContent(String, String) - Method in class com.android.testutils.truth.AbstractZipSubject
Asserts the zip file contains a file without the specified byte sequence anywhere in the file
contentWithUnixLineSeparatorsIsExactly(String) - Method in class com.android.testutils.truth.FileSubject
 
createTempDirDeletedOnExit() - Static method in class com.android.testutils.TestUtils
 

D

deleteFile(File) - Static method in class com.android.testutils.TestUtils
 
DexBackedDexFileSubject - Class in com.android.testutils.truth
 
DexClassSubject - Class in com.android.testutils.truth
 
DexFileSubject - Class in com.android.testutils.truth
 
DexFileSubject(FailureStrategy, File) - Constructor for class com.android.testutils.truth.DexFileSubject
 
DexSubject - Interface in com.android.testutils.truth
 
DexUtils - Class in com.android.testutils.truth
 
doesNotContain(String) - Method in class com.android.testutils.truth.AbstractZipSubject
Asserts the zip file does not contains a file with the specified path.
doesNotContain(String) - Method in class com.android.testutils.truth.FileSubject
 
doesNotExist() - Method in class com.android.testutils.truth.FileSubject
 
doesNotExist() - Method in class com.android.testutils.truth.PathSubject
 
doesNotHaveField(String) - Method in class com.android.testutils.truth.DexClassSubject
 
doesNotHaveMethod(String) - Method in class com.android.testutils.truth.DexClassSubject
 
doOnZipEntry(byte[]) - Method in interface com.android.testutils.truth.AbstractZipSubject.ZipEntryAction
Perform an action on zip entry extracted to a temporary file.

E

entries(String) - Method in class com.android.testutils.truth.AbstractZipSubject
Returns a IterableSubject of all the Zip entries which name matches the passed regular expression.
error(Throwable, String, Object...) - Method in class com.android.testutils.MockLog
 
error(Throwable, String, Object...) - Method in class com.android.testutils.NoErrorsOrWarningsLogger
 
eventually(Runnable) - Static method in class com.android.testutils.TestUtils
Asserts that a runnable will eventually not throw an assertion exception.
eventually(Runnable, Duration) - Static method in class com.android.testutils.TestUtils
Asserts that a runnable will eventually not throw AssertionError before timeoutMs milliseconds have ellapsed
execute(Runnable) - Method in class com.android.testutils.VirtualTimeScheduler
 
exists() - Method in class com.android.testutils.truth.FileSubject
 
exists() - Method in class com.android.testutils.truth.PathSubject
 
extractContentAsByte(String) - Method in class com.android.testutils.truth.AbstractZipSubject
 
extractContentAsString(String) - Method in class com.android.testutils.truth.AbstractZipSubject
 
extractEntryAndRunAction(String, AbstractZipSubject.ZipEntryAction<T>) - Method in class com.android.testutils.truth.AbstractZipSubject
Convenience method to extract an entry from the current zip file, and run a AbstractZipSubject.ZipEntryAction on it.

F

FACTORY - Static variable in class com.android.testutils.truth.DexBackedDexFileSubject
 
FACTORY - Static variable in class com.android.testutils.truth.DexClassSubject
 
FACTORY - Static variable in class com.android.testutils.truth.DexFileSubject
 
FACTORY - Static variable in class com.android.testutils.truth.FileRecordSubject
 
FACTORY - Static variable in class com.android.testutils.truth.FileSubject
 
factory() - Static method in class com.android.testutils.truth.FileSubjectFactory
 
FACTORY - Static variable in class com.android.testutils.truth.PathSubject
 
FileRecord - Class in com.android.testutils.incremental
Record of a file for verify if a File has changed.
FileRecordSubject - Class in com.android.testutils.truth
Truth support for validating FileRecord.
FileRecordSubject(FailureStrategy, FileRecord) - Constructor for class com.android.testutils.truth.FileRecordSubject
 
FileSubject - Class in com.android.testutils.truth
Truth support for validating File.
FileSubject(FailureStrategy, File) - Constructor for class com.android.testutils.truth.FileSubject
 
FileSubjectFactory - Class in com.android.testutils.truth
Factory to add truth support for File.

G

get() - Method in class com.android.testutils.VirtualTimeFuture
 
get(long, TimeUnit) - Method in class com.android.testutils.VirtualTimeFuture
 
getActionsExecuted() - Method in class com.android.testutils.VirtualTimeScheduler
 
getActionsQueued() - Method in class com.android.testutils.VirtualTimeScheduler
 
getCallable() - Method in class com.android.testutils.VirtualTimeFuture
Gets the Callable this future is created for.
getCanonicalRoot(String...) - Static method in class com.android.testutils.TestUtils
returns a File for the subfolder of the test resource data.
getCurrentTimeNanos() - Method in class com.android.testutils.VirtualTimeScheduler
 
getDelay(TimeUnit) - Method in class com.android.testutils.VirtualTimeFuture
 
getDiff(String, String) - Static method in class com.android.testutils.TestUtils
 
getDiff(String[], String[]) - Static method in class com.android.testutils.TestUtils
 
getDirectory(String) - Static method in class com.android.testutils.TestResources
Variant of TestResources.getDirectory(Class, String) that only works with absolute paths, so doesn't need a "context" class.
getDirectory(Class<?>, String) - Static method in class com.android.testutils.TestResources
Returns a file that is a directory from resources.
getDisplaySubject() - Method in class com.android.testutils.truth.DexBackedDexFileSubject
 
getDisplaySubject() - Method in class com.android.testutils.truth.DexClassSubject
 
getFile() - Method in class com.android.testutils.incremental.FileRecord
 
getFile(String) - Static method in class com.android.testutils.TestResources
Variant of TestResources.getFile(Class, String) that only works with absolute paths, so doesn't need a "context" class.
getFile(Class<?>, String) - Static method in class com.android.testutils.TestResources
Returns a file from class resources.
getFileInDirectory(Class<?>, String, String) - Static method in class com.android.testutils.TestResources
Given a resourceName relative to clazz, copies the resource to a new file at filePath and registers that to be deleted when the JVM exits.
getFolderName() - Method in enum com.android.testutils.OsType
The name of this OS as it appears on disk.
getFurthestScheduledTimeNanos() - Method in class com.android.testutils.VirtualTimeScheduler
 
getHash() - Method in class com.android.testutils.incremental.FileRecord
 
getHostOs() - Static method in enum com.android.testutils.OsType
Get the matching OsType for the current system's OS (or OsType.UNKNOWN if no match).
getId() - Method in class com.android.testutils.VirtualTimeFuture
Helper used by the scheduler's Comparator to distinguish/order futures scheduled for the same time.
getInputStream(ZipFile, String) - Method in class com.android.testutils.truth.AbstractZipSubject
 
getLatestAndroidPlatform() - Static method in class com.android.testutils.TestUtils
 
getMessages() - Method in class com.android.testutils.MockLog
 
getOffset() - Method in class com.android.testutils.VirtualTimeFuture
Gets the Offset between invocations of the action behind this future, for repeated actions only.
getOsName() - Static method in enum com.android.testutils.OsType
Get the display-friendly name of the current system's OS.
getOwningScheduler() - Method in class com.android.testutils.VirtualTimeFuture
Gets the VirtualTimeScheduler this future is associated with.
getPlatformFile(String) - Static method in class com.android.testutils.TestUtils
Returns a file at path relative to the root for TestUtils.getLatestAndroidPlatform().
getQueue() - Method in class com.android.testutils.VirtualTimeScheduler
 
getRepeatKind() - Method in class com.android.testutils.VirtualTimeFuture
Describes if this future is repeated and if so how.
getRoot(String...) - Static method in class com.android.testutils.TestUtils
returns a File for the subfolder of the test resource data.
getRunnable() - Method in class com.android.testutils.VirtualTimeFuture
Gets the Runnable this future is created for.
getSdk() - Static method in class com.android.testutils.TestUtils
Return the SDK directory.
getSubject(FailureStrategy, File) - Method in class com.android.testutils.truth.FileSubjectFactory
 
getTick() - Method in class com.android.testutils.VirtualTimeFuture
Gets the virtual time in nano seconds that this future is scheduled to execute at.
getWorkspaceFile(String) - Static method in class com.android.testutils.TestUtils
Given a full path to a file from the base of the current workspace, return the file.
getWorkspaceRoot() - Static method in class com.android.testutils.TestUtils
Returns the root of the entire Android Studio codebase.

H

hasChanged() - Method in class com.android.testutils.truth.FileRecordSubject
 
hasContents(String) - Method in class com.android.testutils.truth.FileSubject
 
hasField(String) - Method in class com.android.testutils.truth.DexClassSubject
 
hasMethod(String) - Method in class com.android.testutils.truth.DexClassSubject
 
hasMethods(String...) - Method in class com.android.testutils.truth.DexClassSubject
 
hasName(String) - Method in class com.android.testutils.truth.FileSubject
 
hasName(String) - Method in class com.android.testutils.truth.PathSubject
 
hasNotChanged() - Method in class com.android.testutils.truth.FileRecordSubject
 
hasValueEqualTo(T) - Method in class com.android.testutils.truth.Java8OptionalSubject
 

I

IndirectSubject<S extends com.google.common.truth.Subject> - Interface in com.android.testutils.truth
Make assertions more readable as english.
info(String, Object...) - Method in class com.android.testutils.MockLog
 
InterProcessConcurrencyTester - Class in com.android.testutils.concurrency
Utility class to test inter-process concurrency.
InterProcessConcurrencyTester() - Constructor for class com.android.testutils.concurrency.InterProcessConcurrencyTester
 
InterProcessConcurrencyTester.MainProcessNotifier - Class in com.android.testutils.concurrency
Class to be used by client processes (which are executing the actions under test) to notify the main process of events happening in the client processes.
invokeAll(Collection<? extends Callable<T>>) - Method in class com.android.testutils.VirtualTimeScheduler
 
invokeAll(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class com.android.testutils.VirtualTimeScheduler
 
invokeAny(Collection<? extends Callable<T>>) - Method in class com.android.testutils.VirtualTimeScheduler
 
invokeAny(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class com.android.testutils.VirtualTimeScheduler
 
isAbsent() - Method in class com.android.testutils.truth.Java8OptionalSubject
 
isCancelled() - Method in class com.android.testutils.VirtualTimeFuture
 
isDirectory() - Method in class com.android.testutils.truth.FileSubject
 
isDirectory() - Method in class com.android.testutils.truth.PathSubject
 
isDone() - Method in class com.android.testutils.VirtualTimeFuture
 
isFile() - Method in class com.android.testutils.truth.FileSubject
 
isFile() - Method in class com.android.testutils.truth.PathSubject
 
isNewerThan(long) - Method in class com.android.testutils.truth.FileSubject
 
isNewerThan(File) - Method in class com.android.testutils.truth.FileSubject
 
isPresent() - Method in class com.android.testutils.truth.Java8OptionalSubject
 
isShutdown() - Method in class com.android.testutils.VirtualTimeScheduler
 
isTerminated() - Method in class com.android.testutils.VirtualTimeScheduler
 

J

JarTestSuite - Class in com.android.testutils
 
JarTestSuite() - Constructor for class com.android.testutils.JarTestSuite
 
JarTestSuiteRunner - Class in com.android.testutils
 
JarTestSuiteRunner(Class<?>, RunnerBuilder) - Constructor for class com.android.testutils.JarTestSuiteRunner
 
JarTestSuiteRunner.ExcludeClasses - Annotation Type in com.android.testutils
Putatively temporary mechanism to avoid running certain classes.
Java8OptionalSubject<T> - Class in com.android.testutils.truth
Truth Subject for Java 8 Optional.
Java8OptionalSubject(FailureStrategy, Optional<T>) - Constructor for class com.android.testutils.truth.Java8OptionalSubject
 

L

loadDex(byte[]) - Static method in class com.android.testutils.truth.DexUtils
 
loadDex(Path) - Static method in class com.android.testutils.truth.DexUtils
 
loadDex(File) - Static method in class com.android.testutils.truth.DexUtils
 

M

MainProcessNotifier(int) - Constructor for class com.android.testutils.concurrency.InterProcessConcurrencyTester.MainProcessNotifier
Creates a new instance of MainProcessNotifier.
MockLog - Class in com.android.testutils
An instance of ILogger that captures all messages to an internal list.
MockLog() - Constructor for class com.android.testutils.MockLog
 
MoreTruth - Class in com.android.testutils.truth
Additional entry point to Truth framework for custom Subject.
MoreTruth() - Constructor for class com.android.testutils.truth.MoreTruth
 

N

NoErrorsOrWarningsLogger - Class in com.android.testutils
 
NoErrorsOrWarningsLogger() - Constructor for class com.android.testutils.NoErrorsOrWarningsLogger
 
now() - Method in class com.android.testutils.VirtualTimeDateProvider
 

O

of(File) - Static method in class com.android.testutils.incremental.FileRecord
 
OsType - Enum in com.android.testutils
Enumeration of supported OSes, plus some helpful utility methods.

P

PathSubject - Class in com.android.testutils.truth
Truth support for validating java.nio.file.Path.
PathSubject(FailureStrategy, Path) - Constructor for class com.android.testutils.truth.PathSubject
 
processStarted() - Method in class com.android.testutils.concurrency.InterProcessConcurrencyTester.MainProcessNotifier
Notifies the main process that the current client process has started execution.

S

schedule(Runnable, long, TimeUnit) - Method in class com.android.testutils.VirtualTimeScheduler
 
schedule(Callable<V>, long, TimeUnit) - Method in class com.android.testutils.VirtualTimeScheduler
 
scheduleAtFixedRate(Runnable, long, long, TimeUnit) - Method in class com.android.testutils.VirtualTimeScheduler
 
scheduleWithFixedDelay(Runnable, long, long, TimeUnit) - Method in class com.android.testutils.VirtualTimeScheduler
 
setProperty(String, String) - Method in class com.android.testutils.SystemPropertyOverrides
Sets a system property (by calling System.setProperty(String, String)) while backing up the original value and replacing it once this class is closed.
shutdown() - Method in class com.android.testutils.VirtualTimeScheduler
 
shutdownNow() - Method in class com.android.testutils.VirtualTimeScheduler
 
submit(Callable<T>) - Method in class com.android.testutils.VirtualTimeScheduler
 
submit(Runnable, T) - Method in class com.android.testutils.VirtualTimeScheduler
 
submit(Runnable) - Method in class com.android.testutils.VirtualTimeScheduler
 
SystemPropertyOverrides - Class in com.android.testutils
Utility to make it easier for tests to override system properties (instead of directly using System.setProperty(String, String)).
SystemPropertyOverrides() - Constructor for class com.android.testutils.SystemPropertyOverrides
 

T

TestResources - Class in com.android.testutils
Util class to help get testing resources.
TestUtils - Class in com.android.testutils
Utility methods to deal with loading the test data.
TestUtils() - Constructor for class com.android.testutils.TestUtils
 
that() - Method in interface com.android.testutils.truth.IndirectSubject
 
toString() - Method in class com.android.testutils.incremental.FileRecord
 
toString() - Method in class com.android.testutils.MockLog
 

V

valueOf(String) - Static method in enum com.android.testutils.OsType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.android.testutils.VirtualTimeRepeatKind
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.android.testutils.OsType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.android.testutils.VirtualTimeRepeatKind
Returns an array containing the constants of this enum type, in the order they are declared.
verbose(String, Object...) - Method in class com.android.testutils.MockLog
 
VirtualTimeDateProvider - Class in com.android.testutils
An implementation of DateProvider that uses the virtual notion of time of a VirtualTimeScheduler to provide a presentation of "now".
VirtualTimeDateProvider(VirtualTimeScheduler) - Constructor for class com.android.testutils.VirtualTimeDateProvider
 
VirtualTimeFuture<T> - Class in com.android.testutils
Future used by the VirtualTimeScheduler to track the actions scheduled on it.
VirtualTimeRepeatKind - Enum in com.android.testutils
Used in the VirtualTimeScheduler and VirtualTimeFuture to determine if and how the scheduled job should be repeated.
VirtualTimeScheduler - Class in com.android.testutils
VirtualTimeScheduler is a ScheduledExecutorService that uses a virtual notion of time.
VirtualTimeScheduler() - Constructor for class com.android.testutils.VirtualTimeScheduler
 

W

waitForFileSystemTick() - Static method in class com.android.testutils.TestUtils
Sleeps the current thread for enough time to ensure that the local file system had enough time to notice a "tick".
waitForFileSystemTick(long) - Static method in class com.android.testutils.TestUtils
Sleeps the current thread for enough time to ensure that the local file system had enough time to notice a "tick".
warning(String, Object...) - Method in class com.android.testutils.MockLog
 
warning(String, Object...) - Method in class com.android.testutils.NoErrorsOrWarningsLogger
 
wasModifiedAt(long) - Method in class com.android.testutils.truth.FileSubject
 

Z

ZipFileSubject - Class in com.android.testutils.truth
Truth support for zip files.
ZipFileSubject(FailureStrategy, File) - Constructor for class com.android.testutils.truth.ZipFileSubject
 
A C D E F G H I J L M N O P S T V W Z 
Skip navigation links