public final class MultisetSubject extends IterableSubject
Multiset
subjects.IterableSubject.UsingCorrespondence<A,E>
failureStrategy
Modifier and Type | Method and Description |
---|---|
void |
hasCount(Object element,
int expectedCount)
Fails if the element does not have the given count.
|
MultisetSubject |
named(String format,
Object... args)
Adds a prefix to the subject, when it is displayed in error messages.
|
comparingElementsUsing, contains, containsAllIn, containsAllOf, containsAnyIn, containsAnyOf, containsExactly, containsExactlyElementsIn, containsNoDuplicates, containsNoneIn, containsNoneOf, doesNotContain, failWithBadResultsAndSuffix, hasSize, isEmpty, isNotEmpty, isOrdered, isOrdered, isPartiallyOrdered, isPartiallyOrdered, isStrictlyOrdered, isStrictlyOrdered
actual, actualAsString, actualCustomStringRepresentation, check, equals, fail, fail, fail, failComparing, failComparing, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutSubject, failWithRawMessage, failWithRawMessageAndCause, getDisplaySubject, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs
public MultisetSubject named(String format, Object... args)
Subject
toString()
representation, e.g. boolean.
Writing assertThat(foo).named("foo").isTrue();
then results in a more reasonable error
message.
named()
takes a format template and argument objects which will be substituted into
the template, similar to String.format(String, Object...)
, the chief difference being
that extra parameters (for which there are no template variables) will be appended to the
resulting string in brackets. Additionally, this only supports the %s
template variable
type.
named
in class Subject<IterableSubject,Iterable<?>>
Copyright © 2017. All rights reserved.