public final class MultisetSubject extends IterableSubject
Multiset subjects.IterableSubject.UsingCorrespondence<A,E>| 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.
|
actualCustomStringRepresentation, comparingElementsUsing, contains, containsAllIn, containsAllIn, containsAllOf, containsAnyIn, containsAnyIn, containsAnyOf, containsExactly, containsExactlyElementsIn, containsExactlyElementsIn, containsNoDuplicates, containsNoneIn, containsNoneIn, containsNoneOf, doesNotContain, hasSize, isEmpty, isNoneOf, isNotEmpty, isNotIn, isOrdered, isOrdered, isStrictlyOrdered, isStrictlyOrderedactual, actualAsString, check, check, equals, fail, fail, fail, failComparing, failComparing, failWithActual, failWithActual, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutActual, failWithoutSubject, failWithRawMessage, failWithRawMessageAndCause, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNotEqualTo, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, toStringpublic MultisetSubject named(String format, Object... args)
SubjecttoString() 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 using Strings.lenientFormat.
Note this only supports the %s specifier.
named in class Subject<IterableSubject,Iterable<?>>format - a template with %s placeholdersargs - the object parameters which will be applied to the message template.public final void hasCount(@NullableDecl
Object element,
int expectedCount)
Copyright © 2018. All rights reserved.