Index

A B C D E F G H I L M N O P Q R S T U W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

about(SF) - Method in class com.google.common.truth.AbstractVerb
The recommended method of extension of Truth to new types, which is documented in com.google.common.truth.delegation.DelegationTest.
AbstractArraySubject<S extends AbstractArraySubject<S,T>,T> - Class in com.google.common.truth
A common supertype for Array subjects, abstracting some common display and error infrastructure.
AbstractArraySubject(FailureStrategy, T) - Constructor for class com.google.common.truth.AbstractArraySubject
 
AbstractVerb<T extends AbstractVerb<T>> - Class in com.google.common.truth
 
AbstractVerb(FailureStrategy) - Constructor for class com.google.common.truth.AbstractVerb
 
AbstractVerb.DelegatedVerb<S extends Subject<S,T>,T> - Class in com.google.common.truth
A special Verb implementation which wraps a SubjectFactory
AbstractVerb.MessagePrependingFailureStrategy - Class in com.google.common.truth
 
accumulate(T) - Static method in class com.google.common.truth.SubjectUtils
 
accumulate(T, T...) - Static method in class com.google.common.truth.SubjectUtils
 
accumulate(T, T, T...) - Static method in class com.google.common.truth.SubjectUtils
 
addInterfaceNames(Class<?>[], Set<String>) - Static method in class com.google.common.truth.Platform
 
addTypeNames(Class<?>, Set<String>) - Static method in class com.google.common.truth.Platform
 
allFrom(Iterable<T>) - Method in class com.google.common.truth.CollectionSubject.Has
allOf(T) - Method in class com.google.common.truth.CollectionSubject.Has
Deprecated.
allOf(T, T, T...) - Method in class com.google.common.truth.CollectionSubject.Has
anyFrom(Iterable<T>) - Method in class com.google.common.truth.CollectionSubject.Has
anyOf(T) - Method in class com.google.common.truth.CollectionSubject.Has
Deprecated.
anyOf(T, T, T...) - Method in class com.google.common.truth.CollectionSubject.Has
appendMethodWrapper(StringBuilder, Class<?>, Class<?>, Method) - Method in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 
apply(Statement, Description) - Method in class com.google.common.truth.Expect
 
asList() - Method in class com.google.common.truth.ObjectArraySubject
 
asList() - Method in class com.google.common.truth.PrimitiveBooleanArraySubject
 
asList() - Method in class com.google.common.truth.PrimitiveByteArraySubject
 
asList() - Method in class com.google.common.truth.PrimitiveCharArraySubject
 
asList() - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
 
asList() - Method in class com.google.common.truth.PrimitiveFloatArraySubject
 
asList() - Method in class com.google.common.truth.PrimitiveIntArraySubject
 
asList() - Method in class com.google.common.truth.PrimitiveLongArraySubject
 
ASSERT - Static variable in class com.google.common.truth.Truth
 
ASSERT - Static variable in class org.truth0.Truth
 
assert_() - Static method in class com.google.common.truth.Truth
 
assertThat(boolean[]) - Static method in class com.google.common.truth.Truth
 
assertThat(byte[]) - Static method in class com.google.common.truth.Truth
 
assertThat(char[]) - Static method in class com.google.common.truth.Truth
 
assertThat(double[]) - Static method in class com.google.common.truth.Truth
 
assertThat(float[]) - Static method in class com.google.common.truth.Truth
 
assertThat(int[]) - Static method in class com.google.common.truth.Truth
 
assertThat(long[]) - Static method in class com.google.common.truth.Truth
 
assertThat(Optional<T>) - Static method in class com.google.common.truth.Truth
 
assertThat(Boolean) - Static method in class com.google.common.truth.Truth
 
assertThat(Class<?>) - Static method in class com.google.common.truth.Truth
 
assertThat(Integer) - Static method in class com.google.common.truth.Truth
 
assertThat(Iterable<T>) - Static method in class com.google.common.truth.Truth
 
assertThat(Long) - Static method in class com.google.common.truth.Truth
 
assertThat(Object) - Static method in class com.google.common.truth.Truth
 
assertThat(String) - Static method in class com.google.common.truth.Truth
 
assertThat(Collection<T>) - Static method in class com.google.common.truth.Truth
 
assertThat(List<T>) - Static method in class com.google.common.truth.Truth
 
assertThat(Map<K, V>) - Static method in class com.google.common.truth.Truth
 
assertThat(T) - Static method in class com.google.common.truth.Truth
 
assertThat(T[]) - Static method in class com.google.common.truth.Truth
 
assume() - Static method in class com.google.common.truth.TruthJUnit
 
ASSUME - Static variable in class com.google.common.truth.TruthJUnit
 
ASSUME - Static variable in class org.truth0.Truth
 
AutoValue_Expect_ExpectationFailure - Class in com.google.common.truth
 
AutoValue_Expect_ExpectationFailure(String, Throwable) - Constructor for class com.google.common.truth.AutoValue_Expect_ExpectationFailure
 

B

booleanSubject() - Method in class com.google.common.truth.BooleanSubject
 
BooleanSubject - Class in com.google.common.truth
Propositions for boolean subjects.
BooleanSubject(FailureStrategy, Boolean) - Constructor for class com.google.common.truth.BooleanSubject
 
build() - Method in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 
byteCodeForClasses - Variable in class com.google.common.truth.codegen.CompilingClassLoader
 

C

CANNOT_WRAP_MSG - Static variable in class com.google.common.truth.IteratingVerb
 
cause - Variable in class com.google.common.truth.AutoValue_Expect_ExpectationFailure
 
cause() - Method in class com.google.common.truth.AutoValue_Expect_ExpectationFailure
 
cause() - Method in class com.google.common.truth.Expect.ExpectationFailure
 
check - Variable in class com.google.common.truth.IterableSubject.NotInOrder
 
check() - Method in class com.google.common.truth.Subject
A convenience for implementers of Subject subclasses to use other truth Subject wrappers within their own propositional logic.
check(T, T) - Method in interface com.google.common.truth.ListSubject.PairwiseChecker
 
CLASS_TEMPLATE - Static variable in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
A string intended for use in String.format() representing the text of the code of the wrapper class.
className - Variable in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 
ClassSubject - Class in com.google.common.truth
Propositions for Class subjects.
ClassSubject(FailureStrategy, Class<?>) - Constructor for class com.google.common.truth.ClassSubject
 
CollectionSubject<S extends CollectionSubject<S,T,C>,T,C extends Collection<T>> - Class in com.google.common.truth
Propositions for Collection subjects.
CollectionSubject(FailureStrategy, C) - Constructor for class com.google.common.truth.CollectionSubject
 
CollectionSubject.Has<T,C extends Collection<T>> - Class in com.google.common.truth
 
com.google.common.truth - package com.google.common.truth
 
com.google.common.truth.codegen - package com.google.common.truth.codegen
 
ComparableSubject<S extends Subject<S,T>,T extends Comparable> - Class in com.google.common.truth
Propositions for Comparable typed subjects.
ComparableSubject(FailureStrategy, T) - Constructor for class com.google.common.truth.ComparableSubject
 
comparesEqualTo(T) - Method in class com.google.common.truth.ComparableSubject
Fails if the subject is not equivalent to the given value according to Comparable.compareTo(T).
comparisonFailure(String, String, String) - Static method in class com.google.common.truth.Platform
 
CompilerException(String) - Constructor for exception com.google.common.truth.codegen.CompilingClassLoader.CompilerException
 
compileSourceCodeToByteCode(String, String, DiagnosticListener<JavaFileObject>) - Method in class com.google.common.truth.codegen.CompilingClassLoader
 
compileWrapperClass(SubjectFactory<?, ?>) - Static method in class com.google.common.truth.IteratingVerb
 
CompilingClassLoader - Class in com.google.common.truth.codegen
This is a Java ClassLoader that will attempt to load a class from a string of source code.
CompilingClassLoader(ClassLoader, String, String, DiagnosticListener<JavaFileObject>) - Constructor for class com.google.common.truth.codegen.CompilingClassLoader
 
CompilingClassLoader.CompilerException - Exception in com.google.common.truth.codegen
Thrown when code cannot be compiled.
CompilingClassLoader.InMemoryFileManager - Class in com.google.common.truth.codegen
Provides an in-memory representation of JavaFileManager abstraction, so we do not need to write any files to disk.
CompilingClassLoader.InMemoryJavaFile - Class in com.google.common.truth.codegen
 
compressType(String) - Static method in class com.google.common.truth.Platform
Inspired by JavaWriter.
contains(CharSequence) - Method in class com.google.common.truth.StringSubject
Fails if the string does not contain the given sequence.
contains(Object) - Method in class com.google.common.truth.IterableSubject
Attests (with a side-effect failure) that the subject contains the supplied item.
contains(String, Iterable<?>) - Method in class com.google.common.truth.IterableSubject
 
containsAll(String, Iterable<?>) - Method in class com.google.common.truth.IterableSubject
 
containsAllIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
Attests that the subject contains at least all of the provided objects or fails, potentially permitting duplicates in both the subject and the parameters (if the subject even can have duplicates).
containsAllOf(Object, Object, Object...) - Method in class com.google.common.truth.IterableSubject
Attests that the subject contains at least all of the provided objects or fails, potentially permitting duplicates in both the subject and the parameters (if the subject even can have duplicates).
containsAnyIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
Attests that a Collection contains at least one of the objects contained in the provided collection or fails.
containsAnyOf(Object, Object, Object...) - Method in class com.google.common.truth.IterableSubject
Attests that the subject contains at least one of the provided objects or fails.
containsEntry(Object, Object) - Method in class com.google.common.truth.MapSubject
Fails if the map does not contain the given entry.
containsExactly(Object...) - Method in class com.google.common.truth.IterableSubject
Attests that a subject contains all of the provided objects and only these objects or fails, potentially permitting duplicates in both the subject and the parameters (if the subject even can have duplicates).
containsExactly(String, Iterable<?>) - Method in class com.google.common.truth.IterableSubject
 
containsExactlyElementsIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
Attests that a subject contains all of the provided objects and only these objects or fails, potentially permitting duplicates in both the subject and the parameters (if the subject even can have duplicates).
containsKey(Object) - Method in class com.google.common.truth.MapSubject
Fails if the map does not contain the given key.
containsMatch(String) - Method in class com.google.common.truth.StringSubject
Fails if the string does not contain a match on the given regex.
containsMatch(Pattern) - Method in class com.google.common.truth.StringSubject
Fails if the string does not contain a match on the given regex.
containsNoDuplicates() - Method in class com.google.common.truth.IterableSubject
Attests that the subject does not contain duplicate elements.
containsNone(String, Iterable<?>) - Method in class com.google.common.truth.IterableSubject
 
containsNoneIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
Attests that a Collection contains none of the objects contained in the provided collection or fails, eliding duplicates.
containsNoneOf(Object, Object, Object...) - Method in class com.google.common.truth.IterableSubject
Attests that a subject contains none of the provided objects or fails, eliding duplicates.
containsOnlyElements(Object, Object, Object...) - Method in class com.google.common.truth.IterableSubject
containsOnlyElementsIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
containsSequence(List<?>) - Method in class com.google.common.truth.ListSubject
Fails if the list does not contain the specified sequence.
countDuplicates(Collection<T>) - Static method in class com.google.common.truth.SubjectUtils
 
countOf(T, Iterable<T>) - Static method in class com.google.common.truth.SubjectUtils
 
create() - Static method in class com.google.common.truth.Expect
 
create(FailureStrategy, Iterable<T>) - Static method in class com.google.common.truth.IterableSubject
 
create(FailureStrategy, Collection<T>) - Static method in class com.google.common.truth.CollectionSubject
 
create(FailureStrategy, List<T>) - Static method in class com.google.common.truth.ListSubject
 
create(FailureStrategy, Map<K, V>) - Static method in class com.google.common.truth.MapSubject
 
create(String) - Static method in class com.google.common.truth.Expect.ExpectationFailure
 
create(String, Throwable) - Static method in class com.google.common.truth.Expect.ExpectationFailure
 
customName - Variable in class com.google.common.truth.Subject
 

D

data - Variable in class com.google.common.truth.IteratingVerb
 
declaresField(String) - Method in class com.google.common.truth.ClassSubject
 
DefaultSubject - Class in com.google.common.truth
 
DefaultSubject(FailureStrategy, Object) - Constructor for class com.google.common.truth.DefaultSubject
 
delegate - Variable in class com.google.common.truth.AbstractVerb.MessagePrependingFailureStrategy
 
DelegatedVerb(FailureStrategy, SubjectFactory<S, T>) - Constructor for class com.google.common.truth.AbstractVerb.DelegatedVerb
 
doesNotContain(CharSequence) - Method in class com.google.common.truth.StringSubject
Fails if the string contains the given sequence.
doesNotContain(Object) - Method in class com.google.common.truth.IterableSubject
Attests (with a side-effect failure) that the subject does not contain the supplied item.
doesNotContainEntry(Object, Object) - Method in class com.google.common.truth.MapSubject
Fails if the map contains the given entry.
doesNotContainKey(Object) - Method in class com.google.common.truth.MapSubject
Fails if the map contains the given key.
doesNotContainMatch(String) - Method in class com.google.common.truth.StringSubject
Fails if the string contains a match on the given regex.
doesNotContainMatch(Pattern) - Method in class com.google.common.truth.StringSubject
Fails if the string contains a match on the given regex.
doesNotMatch(String) - Method in class com.google.common.truth.StringSubject
Fails if the string matches the given regex.
doesNotMatch(Pattern) - Method in class com.google.common.truth.StringSubject
Fails if the string matches the given regex.

E

EMPTY_URI - Static variable in class com.google.common.truth.codegen.CompilingClassLoader
 
endsWith(String) - Method in class com.google.common.truth.StringSubject
Fails if the string does not end with the given string.
equals(double, double, double) - Static method in class com.google.common.truth.MathUtil
 
equals(float, float, float) - Static method in class com.google.common.truth.MathUtil
 
equals(Object) - Method in class com.google.common.truth.AutoValue_Expect_ExpectationFailure
 
equals(Object) - Method in class com.google.common.truth.Subject
Deprecated.
This method is not a proposition, but the default Object equality method. Testing code should use "is" or "isEqualTo" propositions for equality tests.
exactly(T) - Method in class com.google.common.truth.CollectionSubject.Has
Attests that a Collection contains at all of the provided objects and only these objects or fails.
exactly(T, T, T...) - Method in class com.google.common.truth.CollectionSubject.Has
Attests that a Collection contains at all of the provided objects and only these objects or fails.
exactlyAs(Iterable<T>) - Method in class com.google.common.truth.CollectionSubject.Has
Attests that a Collection contains at all of the objects contained in the provided collection and only these objects or fails.
Expect - Class in com.google.common.truth
 
Expect(Expect.ExpectationGatherer) - Constructor for class com.google.common.truth.Expect
 
Expect.ExpectationFailure - Class in com.google.common.truth
 
Expect.ExpectationGatherer - Class in com.google.common.truth
 
ExpectationFailure() - Constructor for class com.google.common.truth.Expect.ExpectationFailure
 
ExpectationGatherer() - Constructor for class com.google.common.truth.Expect.ExpectationGatherer
 

F

factory - Variable in class com.google.common.truth.AbstractVerb.DelegatedVerb
 
fail() - Method in class com.google.common.truth.AbstractVerb
Triggers the failure strategy with an empty failure message
fail(String) - Method in class com.google.common.truth.AbstractVerb.MessagePrependingFailureStrategy
 
fail(String) - Method in class com.google.common.truth.Expect.ExpectationGatherer
 
fail(String) - Method in class com.google.common.truth.FailureStrategy
 
fail(String) - Method in class com.google.common.truth.Subject
Assembles a failure message and passes such to the FailureStrategy
fail(String, Object) - Method in class com.google.common.truth.Subject
Assembles a failure message and passes such to the FailureStrategy.
fail(String, Object...) - Method in class com.google.common.truth.AbstractVerb
Triggers the failure strategy with the given failure message
fail(String, Object...) - Method in class com.google.common.truth.Subject
Assembles a failure message and passes such to the FailureStrategy
fail(String, Throwable) - Method in class com.google.common.truth.AbstractVerb.MessagePrependingFailureStrategy
 
fail(String, Throwable) - Method in class com.google.common.truth.Expect.ExpectationGatherer
 
fail(String, Throwable) - Method in class com.google.common.truth.FailureStrategy
 
failComparing(String, CharSequence, CharSequence) - Method in class com.google.common.truth.AbstractVerb.MessagePrependingFailureStrategy
 
failComparing(String, CharSequence, CharSequence) - Method in class com.google.common.truth.Expect.ExpectationGatherer
 
failComparing(String, CharSequence, CharSequence) - Method in class com.google.common.truth.FailureStrategy
 
failureMessage - Variable in class com.google.common.truth.TestVerb
 
failureMessagePrepend - Variable in class com.google.common.truth.AbstractVerb.MessagePrependingFailureStrategy
 
failureStrategy - Variable in class com.google.common.truth.AbstractVerb.DelegatedVerb
 
failureStrategy - Variable in class com.google.common.truth.AbstractVerb
 
failureStrategy - Variable in class com.google.common.truth.IteratingVerb
 
failureStrategy - Variable in class com.google.common.truth.Subject
 
FailureStrategy - Class in com.google.common.truth
 
FailureStrategy - Class in org.truth0
Deprecated.
FailureStrategy() - Constructor for class com.google.common.truth.FailureStrategy
 
FailureStrategy() - Constructor for class org.truth0.FailureStrategy
Deprecated.
 
FailureStrategy.ThrowableAssertionError - Error in com.google.common.truth
Deprecated.
Use AssertionError instead.
failWithBadResults(String, Object, String, Object) - Method in class com.google.common.truth.Subject
Assembles a failure message and passes it to the FailureStrategy
failWithBadType(Object) - Method in class com.google.common.truth.AbstractArraySubject
 
failWithCustomSubject(String, Object, Object) - Method in class com.google.common.truth.Subject
Assembles a failure message with an alternative representation of the wrapped subject and passes it to the FailureStrategy
failWithoutSubject(String) - Method in class com.google.common.truth.Subject
Assembles a failure message without a given subject and passes it to the FailureStrategy
failWithRawMessage(String, Object...) - Method in class com.google.common.truth.Subject
Passes through a failure message verbatim.
findClass(String) - Method in class com.google.common.truth.codegen.CompilingClassLoader
Override ClassLoader's class resolving method.
format(String, Object...) - Static method in class com.google.common.truth.StringUtil
Substitutes each %s in template with an argument.

G

gatherer - Variable in class com.google.common.truth.Expect
 
getCharContent(boolean) - Method in class com.google.common.truth.codegen.CompilingClassLoader.InMemoryJavaFile
 
getDisplaySubject() - Method in class com.google.common.truth.AbstractArraySubject
 
getDisplaySubject() - Method in class com.google.common.truth.StringSubject
 
getDisplaySubject() - Method in class com.google.common.truth.Subject
 
getFailureMessage() - Method in class com.google.common.truth.AbstractVerb
 
getFailureMessage() - Method in class com.google.common.truth.TestVerb
 
getFailureStrategy() - Method in class com.google.common.truth.AbstractVerb
 
getFailureStrategy() - Method in class com.google.common.truth.Expect
 
getField(Class<?>, String) - Static method in class com.google.common.truth.ReflectionUtil
 
getJavaFileForOutput(JavaFileManager.Location, String, JavaFileObject.Kind, FileObject) - Method in class com.google.common.truth.codegen.CompilingClassLoader.InMemoryFileManager
 
getSubject() - Method in class com.google.common.truth.Subject
 
getSubject(FailureStrategy, T) - Method in class com.google.common.truth.SubjectFactory
 
getSubject(FailureStrategy, T) - Method in class org.truth0.subjects.SubjectFactory
Deprecated.
 
getSubject(FailureStrategy, T) - Method in class org.truth0.subjects.SubjectFactory
Deprecated.
 
getSubjectClass() - Method in class com.google.common.truth.SubjectFactory
 

H

has() - Method in class com.google.common.truth.CollectionSubject
 
Has() - Constructor for class com.google.common.truth.CollectionSubject.Has
 
hasField(String) - Method in class com.google.common.truth.Subject
 
hashCode() - Method in class com.google.common.truth.AutoValue_Expect_ExpectationFailure
 
hashCode() - Method in class com.google.common.truth.Subject
Deprecated.
Equals/Hashcode is not supported on Subjects. Their only use is as a holder of propositions. Use of equals() is deprecated and forwards to isEqualTo() and hashCode() is disallowed.
hasKey(K) - Method in class com.google.common.truth.MapSubject
Deprecated.
hasLength(int) - Method in class com.google.common.truth.AbstractArraySubject
Fails if the array does not have the given length.
hasLength(int) - Method in class com.google.common.truth.StringSubject
Fails if the string does not have the given length.
hasSize(int) - Method in class com.google.common.truth.IterableSubject
Fails if the subject does not have the given size.
hasSize(int) - Method in class com.google.common.truth.MapSubject
Fails if the map does not have the given size.
hasValue(Object) - Method in class com.google.common.truth.OptionalSubject
Fails if the Optional<T> does not have the given value.

I

in(Iterable<T>) - Method in class com.google.common.truth.AbstractVerb
 
IN_ORDER - Static variable in class com.google.common.truth.IterableSubject
Ordered implementation that does nothing because it's already known to be true.
InMemoryFileManager(JavaFileManager) - Constructor for class com.google.common.truth.codegen.CompilingClassLoader.InMemoryFileManager
 
InMemoryJavaFile(String, String) - Constructor for class com.google.common.truth.codegen.CompilingClassLoader.InMemoryJavaFile
 
inOrder() - Method in class com.google.common.truth.IterableSubject.NotInOrder
 
inOrder() - Method in interface com.google.common.truth.Ordered
An additional assertion, implemented by some containment subjects which allows for a further constraint of orderedness.
inRuleContext - Variable in class com.google.common.truth.Expect
 
instantiate(Class<?>, Type, FailureStrategy, SF, Iterable<T>) - Method in class com.google.common.truth.IteratingVerb
 
INTEGER - Static variable in class com.google.common.truth.IntegerSubject
Deprecated.
Use a for each style loop over your Iterable<Integer> instead.
IntegerSubject - Class in com.google.common.truth
Propositions for Integer subjects.
IntegerSubject(FailureStrategy, Integer) - Constructor for class com.google.common.truth.IntegerSubject
 
internalCustomName() - Method in class com.google.common.truth.Subject
 
is(byte) - Method in class com.google.common.truth.IntegerSubject
 
is(byte) - Method in class com.google.common.truth.LongSubject
 
is(int) - Method in class com.google.common.truth.LongSubject
 
is(long) - Method in class com.google.common.truth.IntegerSubject
 
is(short) - Method in class com.google.common.truth.IntegerSubject
 
is(short) - Method in class com.google.common.truth.LongSubject
 
is(Object) - Method in class com.google.common.truth.StringSubject
 
is(Object) - Method in class com.google.common.truth.Subject
Deprecated.
Use Subject.isEqualTo(Object) to check object equality or Subject.isSameAs(Object) to check reference equality.
isA(Class<?>) - Method in class com.google.common.truth.Subject
isAbsent() - Method in class com.google.common.truth.OptionalSubject
Fails if the Optional<T> is present.
isAssignableFrom(Class<?>) - Method in class com.google.common.truth.ClassSubject
Fails if this class or interface is not the same as or a superclass or superinterface of the given class or interface.
isAssignableTo(Class<?>) - Method in class com.google.common.truth.ClassSubject
Fails if this class or interface is not the same as or a subclass or subinterface of, the given class or interface.
isAtLeast(T) - Method in class com.google.common.truth.ComparableSubject
Fails if the subject is less than the given value.
isAtMost(T) - Method in class com.google.common.truth.ComparableSubject
Fails if the subject is greater than the given value.
isBetween(int, int) - Method in class com.google.common.truth.IntegerSubject
Deprecated.
Use isIn(Range.open(lower, upper)) instead.
isBetween(long, long) - Method in class com.google.common.truth.LongSubject
Deprecated.
Use isIn(Range.open(lower, upper)) instead.
isEmpty() - Method in class com.google.common.truth.AbstractArraySubject
Fails if the array is not empty (i.e.
isEmpty() - Method in class com.google.common.truth.IterableSubject
Fails if the subject is not empty.
isEmpty() - Method in class com.google.common.truth.MapSubject
Fails if the map is not empty.
isEmpty() - Method in class com.google.common.truth.StringSubject
Fails if the string is not equal to the zero-length "empty string."
isEqualTo(int) - Method in class com.google.common.truth.LongSubject
 
isEqualTo(long) - Method in class com.google.common.truth.IntegerSubject
 
isEqualTo(Object) - Method in class com.google.common.truth.IntegerSubject
 
isEqualTo(Object) - Method in class com.google.common.truth.LongSubject
 
isEqualTo(Object) - Method in class com.google.common.truth.ObjectArraySubject
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveBooleanArraySubject
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveByteArraySubject
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveCharArraySubject
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveFloatArraySubject
Deprecated.
use #isEqualTo(Object, double)
isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveIntArraySubject
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveLongArraySubject
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
isEqualTo(Object) - Method in class com.google.common.truth.StringSubject
 
isEqualTo(Object) - Method in class com.google.common.truth.Subject
Fails if the subject is not equal to the given object.
isEqualTo(Object, double) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
A proposition that the provided double[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
isEqualTo(Object, float) - Method in class com.google.common.truth.PrimitiveFloatArraySubject
A proposition that the provided float[] is an array of the same length and type, and contains elements such that each element in expected is equal to each element in the subject, and in the same position.
isFalse() - Method in class com.google.common.truth.BooleanSubject
Fails if the subject is true.
isGreaterThan(T) - Method in class com.google.common.truth.ComparableSubject
Fails if the subject is not greater than the given value.
isIn(Range<T>) - Method in class com.google.common.truth.ComparableSubject
Fails if the subject is not in the given range.
isInclusivelyInRange(int, int) - Method in class com.google.common.truth.IntegerSubject
Deprecated.
Use isIn(Range.closed(lower, upper)) instead.
isInclusivelyInRange(long, long) - Method in class com.google.common.truth.LongSubject
Deprecated.
Use isIn(Range.closed(lower, upper)) instead.
isInstanceOf(Class<?>) - Method in class com.google.common.truth.Subject
Fails if the subject is not an instance of the given class.
isInstanceOfType(Object, Class<?>) - Static method in class com.google.common.truth.Platform
Returns true if the instance is assignable to the type Clazz.
isInstanceOfTypeGWT(Object, Class<?>) - Static method in class com.google.common.truth.Platform
Returns true if the instance is assignable to the type Clazz (suitable for a GWT environment).
isInstanceOfTypeJava(Object, Class<?>) - Static method in class com.google.common.truth.Platform
Returns true if the instance is assignable to the type Clazz (suitable for a JVM environment).
isLessThan(T) - Method in class com.google.common.truth.ComparableSubject
Fails if the subject is not less than the given value.
isNotA(Class<?>) - Method in class com.google.common.truth.Subject
Deprecated.
isNotEmpty() - Method in class com.google.common.truth.AbstractArraySubject
Fails if the array is empty (i.e.
isNotEmpty() - Method in class com.google.common.truth.IterableSubject
Fails if the subject is empty.
isNotEmpty() - Method in class com.google.common.truth.MapSubject
Fails if the map is empty.
isNotEmpty() - Method in class com.google.common.truth.StringSubject
Fails if the string is equal to the zero-length "empty string."
isNotEqualTo(Object) - Method in class com.google.common.truth.IntegerSubject
 
isNotEqualTo(Object) - Method in class com.google.common.truth.LongSubject
 
isNotEqualTo(Object) - Method in class com.google.common.truth.ObjectArraySubject
 
isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveBooleanArraySubject
 
isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveByteArraySubject
 
isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveCharArraySubject
 
isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveFloatArraySubject
Deprecated.
use #isNotEqualTo(Object, double)
isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveIntArraySubject
 
isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveLongArraySubject
 
isNotEqualTo(Object) - Method in class com.google.common.truth.Subject
Fails if the subject is equal to the given object.
isNotEqualTo(Object, double) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
A proposition that the provided double[] is not an array of the same length or type, or has at least one element that does not pass an equality test within the given tolerance.
isNotEqualTo(Object, float) - Method in class com.google.common.truth.PrimitiveFloatArraySubject
 
isNotIn(Range<T>) - Method in class com.google.common.truth.ComparableSubject
Fails if the subject is in the given range.
isNotInstanceOf(Class<?>) - Method in class com.google.common.truth.Subject
Fails if the subject is an instance of the given class.
isNotNull() - Method in class com.google.common.truth.Subject
Fails if the subject is null.
isNotSameAs(Object) - Method in class com.google.common.truth.Subject
Fails if the subject is the same instance as the given object.
isNull() - Method in class com.google.common.truth.StringSubject
Fails if the string is not null.
isNull() - Method in class com.google.common.truth.Subject
Fails if the subject is not null.
isOrdered() - Method in class com.google.common.truth.ListSubject
Fails if the list is not strictly ordered according to the natural ordering of its elements.
isOrdered(Comparator<T>) - Method in class com.google.common.truth.ListSubject
Fails if the list is not strictly ordered according to the given comparator.
isPartiallyOrdered() - Method in class com.google.common.truth.ListSubject
Fails if the list is not partially ordered according to the natural ordering of its elements.
isPartiallyOrdered(Comparator<T>) - Method in class com.google.common.truth.ListSubject
Fails if the list is not partially ordered according to the given comparator.
isPresent() - Method in class com.google.common.truth.OptionalSubject
Fails if the Optional<T> is absent.
isSameAs(Object) - Method in class com.google.common.truth.Subject
Fails if the subject is not the same instance as the given object.
isTrue() - Method in class com.google.common.truth.BooleanSubject
Fails if the subject is false.
item(T) - Method in class com.google.common.truth.CollectionSubject.Has
Deprecated.
IterableSubject<S extends IterableSubject<S,T,C>,T,C extends Iterable<T>> - Class in com.google.common.truth
Propositions for Iterable subjects.
IterableSubject(FailureStrategy, C) - Constructor for class com.google.common.truth.IterableSubject
 
IterableSubject.NotInOrder - Class in com.google.common.truth
Ordered implementation that always fails.
iteratesAs(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
Asserts that the items are supplied in the order given by the iterable.
iteratesAs(Object...) - Method in class com.google.common.truth.IterableSubject
Asserts that the items are supplied in the order given by the iterable.
iteratesOverSequence(Object...) - Method in class com.google.common.truth.IterableSubject
Deprecated.
Use containsExactly(Object, Object...).inOrder() instead.
ITERATING_WRAPPER - Static variable in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 
IteratingVerb<T> - Class in com.google.common.truth
A verb that iterates over data and applies the predicate iteratively
IteratingVerb(Iterable<T>, FailureStrategy) - Constructor for class com.google.common.truth.IteratingVerb
 
IteratingWrapperClassBuilder - Class in com.google.common.truth.codegen
A builder of classes to wrap a provided SubjectFactory's concrete Subject subclass.
IteratingWrapperClassBuilder(SubjectFactory<?, ?>) - Constructor for class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 

L

labeled(String) - Method in class com.google.common.truth.Subject
Deprecated.
lacksKey(K) - Method in class com.google.common.truth.MapSubject
Deprecated.
listRepresentation() - Method in class com.google.common.truth.AbstractArraySubject
 
listRepresentation() - Method in class com.google.common.truth.ObjectArraySubject
 
listRepresentation() - Method in class com.google.common.truth.PrimitiveBooleanArraySubject
 
listRepresentation() - Method in class com.google.common.truth.PrimitiveByteArraySubject
 
listRepresentation() - Method in class com.google.common.truth.PrimitiveCharArraySubject
 
listRepresentation() - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
 
listRepresentation() - Method in class com.google.common.truth.PrimitiveFloatArraySubject
 
listRepresentation() - Method in class com.google.common.truth.PrimitiveIntArraySubject
 
listRepresentation() - Method in class com.google.common.truth.PrimitiveLongArraySubject
 
ListSubject<S extends ListSubject<S,T,C>,T,C extends List<T>> - Class in com.google.common.truth
Propositions for List subjects.
ListSubject(FailureStrategy, C) - Constructor for class com.google.common.truth.ListSubject
 
ListSubject.PairwiseChecker<T> - Interface in com.google.common.truth
 
LONG - Static variable in class com.google.common.truth.LongSubject
Deprecated.
Use a for each style loop over your Iterable<Integer> instead.
LongSubject - Class in com.google.common.truth
Propositions for long subjects.
LongSubject(FailureStrategy, Long) - Constructor for class com.google.common.truth.LongSubject
 

M

makeUri(String) - Static method in class com.google.common.truth.codegen.CompilingClassLoader.InMemoryJavaFile
 
MapSubject<S extends MapSubject<S,K,V,M>,K,V,M extends Map<K,V>> - Class in com.google.common.truth
Propositions for Map subjects.
MapSubject(FailureStrategy, M) - Constructor for class com.google.common.truth.MapSubject
 
MapSubject.WithValue<V> - Interface in com.google.common.truth
matches(String) - Method in class com.google.common.truth.StringSubject
Fails if the string does not match the given regex.
matches(Pattern) - Method in class com.google.common.truth.StringSubject
Fails if the string does not match the given regex.
MathUtil - Class in com.google.common.truth
Math utilities to be shared by numeric subjects.
MathUtil() - Constructor for class com.google.common.truth.MathUtil
 
message - Variable in class com.google.common.truth.AutoValue_Expect_ExpectationFailure
 
message() - Method in class com.google.common.truth.AutoValue_Expect_ExpectationFailure
 
message() - Method in class com.google.common.truth.Expect.ExpectationFailure
 
messageFor(String, CharSequence, CharSequence) - Static method in class com.google.common.truth.StringUtil
Returns a message appropriate for string comparisons.
MessagePrependingFailureStrategy(FailureStrategy, String) - Constructor for class com.google.common.truth.AbstractVerb.MessagePrependingFailureStrategy
 
messages - Variable in class com.google.common.truth.Expect.ExpectationGatherer
 
methodParameterList(int) - Static method in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 
methodSignature(Class<?>[], Annotation[][]) - Static method in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
Builds a string for the parameters within a method signature.

N

named(String) - Method in class com.google.common.truth.AbstractArraySubject
 
named(String) - Method in class com.google.common.truth.Subject
Renames the subject so that this name appears in the error messages in place of string representations of the subject.
noneFrom(Iterable<T>) - Method in class com.google.common.truth.CollectionSubject.Has
noneOf(T) - Method in class com.google.common.truth.CollectionSubject.Has
Deprecated.
noneOf(T, T, T...) - Method in class com.google.common.truth.CollectionSubject.Has
NotInOrder(String, Iterable<?>) - Constructor for class com.google.common.truth.IterableSubject.NotInOrder
 

O

ObjectArraySubject<T> - Class in com.google.common.truth
A Subject to handle testing propositions for Object[] and more generically T[].
ObjectArraySubject(FailureStrategy, T[]) - Constructor for class com.google.common.truth.ObjectArraySubject
 
OptionalSubject<T> - Class in com.google.common.truth
Propositions for Optional<T> subjects.
OptionalSubject(FailureStrategy, Optional<T>) - Constructor for class com.google.common.truth.OptionalSubject
 
Ordered - Interface in com.google.common.truth
 
org.truth0 - package org.truth0
 
org.truth0.subjects - package org.truth0.subjects
 

P

pairwiseCheck(ListSubject.PairwiseChecker<T>) - Method in class com.google.common.truth.ListSubject
 
Platform - Class in com.google.common.truth
Extracted routines that need to be swapped in for GWT, to allow for minimal deltas between the GWT and non-GWT version.
Platform() - Constructor for class com.google.common.truth.Platform
 
PrimitiveBooleanArraySubject - Class in com.google.common.truth
A Subject to handle testing propositions for boolean[].
PrimitiveBooleanArraySubject(FailureStrategy, boolean[]) - Constructor for class com.google.common.truth.PrimitiveBooleanArraySubject
 
PrimitiveByteArraySubject - Class in com.google.common.truth
A Subject to handle testing propositions for byte[].
PrimitiveByteArraySubject(FailureStrategy, byte[]) - Constructor for class com.google.common.truth.PrimitiveByteArraySubject
 
PrimitiveCharArraySubject - Class in com.google.common.truth
A Subject to handle testing propositions for char[].
PrimitiveCharArraySubject(FailureStrategy, char[]) - Constructor for class com.google.common.truth.PrimitiveCharArraySubject
 
PrimitiveDoubleArraySubject - Class in com.google.common.truth
A Subject to handle testing propositions for double[].
PrimitiveDoubleArraySubject(FailureStrategy, double[]) - Constructor for class com.google.common.truth.PrimitiveDoubleArraySubject
 
PrimitiveFloatArraySubject - Class in com.google.common.truth
A Subject to handle testing propositions for float[].
PrimitiveFloatArraySubject(FailureStrategy, float[]) - Constructor for class com.google.common.truth.PrimitiveFloatArraySubject
 
PrimitiveIntArraySubject - Class in com.google.common.truth
A Subject to handle testing propositions for int[].
PrimitiveIntArraySubject(FailureStrategy, int[]) - Constructor for class com.google.common.truth.PrimitiveIntArraySubject
 
PrimitiveLongArraySubject - Class in com.google.common.truth
A Subject to handle testing propositions for int[].
PrimitiveLongArraySubject(FailureStrategy, long[]) - Constructor for class com.google.common.truth.PrimitiveLongArraySubject
 

Q

quote(CharSequence) - Static method in class com.google.common.truth.StringSubject
 

R

ReflectionUtil - Class in com.google.common.truth
Reflection utility methods.
ReflectionUtil() - Constructor for class com.google.common.truth.ReflectionUtil
 
required - Variable in class com.google.common.truth.IterableSubject.NotInOrder
 

S

serialVersionUID - Static variable in exception com.google.common.truth.codegen.CompilingClassLoader.CompilerException
 
sourceCode - Variable in class com.google.common.truth.codegen.CompilingClassLoader.InMemoryJavaFile
 
startsWith(String) - Method in class com.google.common.truth.StringSubject
Fails if the string does not start with the given string.
STRING - Static variable in class com.google.common.truth.StringSubject
Deprecated.
Use a for each style loop over your Iterable<Integer> instead.
StringSubject - Class in com.google.common.truth
Propositions for string subjects.
StringSubject(FailureStrategy, String) - Constructor for class com.google.common.truth.StringSubject
 
StringUtil - Class in com.google.common.truth
Utilities for string comparisons.
StringUtil() - Constructor for class com.google.common.truth.StringUtil
 
stringVisibility(int) - Static method in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 
stripIfInPackage(String, String) - Static method in class com.google.common.truth.Platform
 
stripIfPrefixed(String, String) - Static method in class com.google.common.truth.Platform
 
subject - Variable in class com.google.common.truth.Subject
 
Subject<S extends Subject<S,T>,T> - Class in com.google.common.truth
Propositions for arbitrarily typed subjects and for properties of Object
Subject<S extends Subject<S,T>,T> - Class in org.truth0.subjects
Deprecated.
use Subject.
Subject(FailureStrategy, T) - Constructor for class com.google.common.truth.Subject
 
Subject(FailureStrategy, T) - Constructor for class org.truth0.subjects.Subject
Deprecated.
 
SUBJECT_TYPE_PARAMETER - Static variable in class com.google.common.truth.SubjectFactory
 
Subject.HasField - Interface in com.google.common.truth
 
subjectFactory - Variable in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 
SubjectFactory<S extends Subject<S,T>,T> - Class in com.google.common.truth
A custom subject factory which will return a FooSubject (which is a Subject).
SubjectFactory<S extends Subject<S,T>,T> - Class in org.truth0.subjects
Deprecated.
SubjectFactory() - Constructor for class com.google.common.truth.SubjectFactory
 
SubjectFactory() - Constructor for class org.truth0.subjects.SubjectFactory
Deprecated.
 
SubjectUtils - Class in com.google.common.truth
Utility methods used in Subject implementors.
SubjectUtils() - Constructor for class com.google.common.truth.SubjectUtils
 

T

TARGET_TYPE_PARAMETER - Static variable in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
 
TestVerb - Class in com.google.common.truth
 
TestVerb - Class in org.truth0
Deprecated.
TestVerb(FailureStrategy) - Constructor for class com.google.common.truth.TestVerb
 
TestVerb(FailureStrategy, String) - Constructor for class com.google.common.truth.TestVerb
 
TestVerb(FailureStrategy) - Constructor for class org.truth0.TestVerb
Deprecated.
 
TestVerb(FailureStrategy, String) - Constructor for class org.truth0.TestVerb
Deprecated.
 
that(boolean[]) - Method in class com.google.common.truth.TestVerb
 
that(byte[]) - Method in class com.google.common.truth.TestVerb
 
that(char[]) - Method in class com.google.common.truth.TestVerb
 
that(double[]) - Method in class com.google.common.truth.TestVerb
 
that(float[]) - Method in class com.google.common.truth.TestVerb
 
that(int[]) - Method in class com.google.common.truth.TestVerb
 
that(long[]) - Method in class com.google.common.truth.TestVerb
 
that(Optional<T>) - Method in class com.google.common.truth.TestVerb
 
that(Boolean) - Method in class com.google.common.truth.TestVerb
 
that(Class<?>) - Method in class com.google.common.truth.TestVerb
 
that(Integer) - Method in class com.google.common.truth.TestVerb
 
that(Iterable<T>) - Method in class com.google.common.truth.TestVerb
 
that(Long) - Method in class com.google.common.truth.TestVerb
 
that(Object) - Method in class com.google.common.truth.TestVerb
 
that(String) - Method in class com.google.common.truth.TestVerb
 
that(Collection<T>) - Method in class com.google.common.truth.TestVerb
 
that(List<T>) - Method in class com.google.common.truth.TestVerb
 
that(Map<K, V>) - Method in class com.google.common.truth.TestVerb
 
that(T) - Method in class com.google.common.truth.AbstractVerb.DelegatedVerb
 
that(T) - Method in class com.google.common.truth.TestVerb
 
that(T[]) - Method in class com.google.common.truth.TestVerb
 
thatEach(SF) - Method in class com.google.common.truth.IteratingVerb
 
THROW_ASSERTION_ERROR - Static variable in class com.google.common.truth.Truth
 
THROW_ASSERTION_ERROR - Static variable in class org.truth0.Truth
Deprecated.
THROW_ASSUMPTION_ERROR - Static variable in class com.google.common.truth.TruthJUnit
 
THROW_ASSUMPTION_ERROR - Static variable in class org.truth0.Truth
ThrowableAssertionError(String, Throwable) - Constructor for error com.google.common.truth.FailureStrategy.ThrowableAssertionError
Deprecated.
 
ThrowableAssumptionViolatedException(String, Throwable) - Constructor for exception com.google.common.truth.TruthJUnit.ThrowableAssumptionViolatedException
 
toString() - Method in class com.google.common.truth.AutoValue_Expect_ExpectationFailure
 
Truth - Class in com.google.common.truth
Truth - a proposition framework for tests, supporting JUnit style assertion and assumption semantics in a fluent style.
Truth - Class in org.truth0
deprecated please use Truth.assert_() and TruthJUnit.assume() to access these capabilities.
Truth() - Constructor for class com.google.common.truth.Truth
 
Truth() - Constructor for class org.truth0.Truth
 
TruthJUnit - Class in com.google.common.truth
Truth - a proposition framework for tests, supporting JUnit style assertion and assumption semantics in a fluent style.
TruthJUnit() - Constructor for class com.google.common.truth.TruthJUnit
 
TruthJUnit.ThrowableAssumptionViolatedException - Exception in com.google.common.truth
 
type - Variable in class com.google.common.truth.SubjectFactory
 
TYPE_PATTERN - Static variable in class com.google.common.truth.Platform
 
typeName - Variable in class com.google.common.truth.ObjectArraySubject
 
typeNameFromInstance(Object) - Method in class com.google.common.truth.ObjectArraySubject
 
typeOnly(String) - Static method in class com.google.common.truth.Platform
 
typeParameter(Class<?>, int) - Static method in class com.google.common.truth.ReflectionUtil
Returns the captured type.

U

underlyingType() - Method in class com.google.common.truth.AbstractArraySubject
 
underlyingType() - Method in class com.google.common.truth.ObjectArraySubject
 
underlyingType() - Method in class com.google.common.truth.PrimitiveBooleanArraySubject
 
underlyingType() - Method in class com.google.common.truth.PrimitiveByteArraySubject
 
underlyingType() - Method in class com.google.common.truth.PrimitiveCharArraySubject
 
underlyingType() - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
 
underlyingType() - Method in class com.google.common.truth.PrimitiveFloatArraySubject
 
underlyingType() - Method in class com.google.common.truth.PrimitiveIntArraySubject
 
underlyingType() - Method in class com.google.common.truth.PrimitiveLongArraySubject
 

W

withFailureMessage(String) - Method in class com.google.common.truth.AbstractVerb
Overrides the failure message of the subsequent subject's propositions.
withFailureMessage(String) - Method in class com.google.common.truth.TestVerb
 
withValue(Object) - Method in interface com.google.common.truth.Subject.HasField
Supplementary assertion in which a present field can be tested to determine if it contains a given value.
withValue(V) - Method in interface com.google.common.truth.MapSubject.WithValue
wrap(FailureStrategy, SF, Iterable<T>) - Method in class com.google.common.truth.IteratingVerb
 
WRAPPER_CACHE - Static variable in class com.google.common.truth.IteratingVerb
 
WRAPPER_METHOD_TEMPLATE - Static variable in class com.google.common.truth.codegen.IteratingWrapperClassBuilder
A string intended for use in String.format() representing the text of the code of all wrapped methods.
A B C D E F G H I L M N O P Q R S T U W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form