public class TestVerb extends AbstractVerb<TestVerb>
AbstractVerb.DelegatedVerb<S extends Subject<S,T>,T>, AbstractVerb.MessagePrependingFailureStrategy
Constructor and Description |
---|
TestVerb(FailureStrategy failureStrategy) |
TestVerb(FailureStrategy failureStrategy,
String message) |
TestVerb(FailureStrategy failureStrategy,
String format,
Object... args) |
Modifier and Type | Method and Description |
---|---|
AtomicLongMapSubject |
that(com.google.common.util.concurrent.AtomicLongMap<?> target) |
BigDecimalSubject |
that(BigDecimal target) |
BooleanSubject |
that(Boolean target) |
PrimitiveBooleanArraySubject |
that(boolean[] target) |
PrimitiveByteArraySubject |
that(byte[] target) |
PrimitiveCharArraySubject |
that(char[] target) |
ClassSubject |
that(Class<?> target) |
DoubleSubject |
that(Double target) |
PrimitiveDoubleArraySubject |
that(double[] target) |
FloatSubject |
that(Float target) |
PrimitiveFloatArraySubject |
that(float[] target) |
PrimitiveIntArraySubject |
that(int[] target) |
IntegerSubject |
that(Integer target) |
IterableSubject |
that(Iterable<?> target) |
ListMultimapSubject |
that(com.google.common.collect.ListMultimap<?,?> target) |
LongSubject |
that(Long target) |
PrimitiveLongArraySubject |
that(long[] target) |
MapSubject |
that(Map<?,?> target) |
MultimapSubject |
that(com.google.common.collect.Multimap<?,?> target) |
MultisetSubject |
that(com.google.common.collect.Multiset<?> target) |
Subject<DefaultSubject,Object> |
that(Object target) |
GuavaOptionalSubject |
that(com.google.common.base.Optional<?> target) |
SetMultimapSubject |
that(com.google.common.collect.SetMultimap<?,?> target) |
PrimitiveShortArraySubject |
that(short[] target) |
SortedMapSubject |
that(SortedMap<?,?> target) |
SortedSetSubject |
that(SortedSet<?> target) |
StringSubject |
that(String target) |
<T extends Comparable<?>> |
that(T target) |
<T> ObjectArraySubject<T> |
that(T[] target) |
TableSubject |
that(com.google.common.collect.Table<?,?,?> target) |
ThrowableSubject |
that(Throwable target) |
TestVerb |
withFailureMessage(String failureMessage)
Overrides the failure message of the subsequent subject's propositions.
|
TestVerb |
withFailureMessage(String format,
Object... args)
Returns a
TestVerb that will prepend the formatted message using the specified
arguments to the failure message in the event of a test failure. |
about, about, fail, fail, getFailureStrategy
getFailureMessage, hasFailureMessage
public TestVerb(FailureStrategy failureStrategy)
public TestVerb(FailureStrategy failureStrategy, @Nullable String message)
public TestVerb(FailureStrategy failureStrategy, @Nullable String format, Object... args)
public <T extends Comparable<?>> ComparableSubject<?,T> that(@Nullable T target)
public BigDecimalSubject that(@Nullable BigDecimal target)
public Subject<DefaultSubject,Object> that(@Nullable Object target)
@GwtIncompatible(value="ClassSubject.java") public ClassSubject that(@Nullable Class<?> target)
public ThrowableSubject that(@Nullable Throwable target)
public LongSubject that(@Nullable Long target)
public DoubleSubject that(@Nullable Double target)
public FloatSubject that(@Nullable Float target)
public IntegerSubject that(@Nullable Integer target)
public BooleanSubject that(@Nullable Boolean target)
public StringSubject that(@Nullable String target)
public IterableSubject that(@Nullable Iterable<?> target)
public SortedSetSubject that(@Nullable SortedSet<?> target)
public <T> ObjectArraySubject<T> that(@Nullable T[] target)
public PrimitiveBooleanArraySubject that(@Nullable boolean[] target)
public PrimitiveShortArraySubject that(@Nullable short[] target)
public PrimitiveIntArraySubject that(@Nullable int[] target)
public PrimitiveLongArraySubject that(@Nullable long[] target)
public PrimitiveCharArraySubject that(@Nullable char[] target)
public PrimitiveByteArraySubject that(@Nullable byte[] target)
public PrimitiveFloatArraySubject that(@Nullable float[] target)
public PrimitiveDoubleArraySubject that(@Nullable double[] target)
public GuavaOptionalSubject that(@Nullable com.google.common.base.Optional<?> target)
public MapSubject that(@Nullable Map<?,?> target)
public SortedMapSubject that(@Nullable SortedMap<?,?> target)
public MultimapSubject that(@Nullable com.google.common.collect.Multimap<?,?> target)
public ListMultimapSubject that(@Nullable com.google.common.collect.ListMultimap<?,?> target)
public SetMultimapSubject that(@Nullable com.google.common.collect.SetMultimap<?,?> target)
public MultisetSubject that(@Nullable com.google.common.collect.Multiset<?> target)
public TableSubject that(@Nullable com.google.common.collect.Table<?,?,?> target)
public AtomicLongMapSubject that(@Nullable com.google.common.util.concurrent.AtomicLongMap<?> target)
public TestVerb withFailureMessage(@Nullable String failureMessage)
AbstractVerb
withFailureMessage
in class AbstractVerb<TestVerb>
failureMessage
- a descriptive message.com.google.common.truth.delegation.DelegationTest
public TestVerb withFailureMessage(@Nullable String format, Object... args)
TestVerb
that will prepend the formatted message using the specified
arguments to the failure message in the event of a test failure.
Note: The failure message template string only supports the "%s"
specifier,
not the full range of Formatter
specifiers.
withFailureMessage
in class AbstractVerb<TestVerb>
format
- a descriptive message with formatting template content.args
- object parameters to be substituted into the message template.IllegalArgumentException
- if the number of placeholders in the format string does not
equal the number of given argumentscom.google.common.truth.delegation.DelegationTest
Copyright © 2017. All rights reserved.