firstKey
. We
haven't found sufficient demand for this class to keep it.@Deprecated public final class SortedMapSubject extends MapSubject
SortedMap
and NavigableMap
objects. This class supports assertions
based on NavigableMap
's API even if the subject only implements SortedMap
.MapSubject.UsingCorrespondence<A,E>
Subject.Factory<SubjectT extends Subject,ActualT>
Modifier and Type | Method and Description |
---|---|
void |
hasFirstEntry(Object key,
Object value)
Deprecated.
Fails if the map's first key/value pair is not equal to the given entry.
|
void |
hasFirstKey(Object key)
Deprecated.
Fails if the map's first key is not equal to the given key.
|
void |
hasLastEntry(Object key,
Object value)
Deprecated.
Fails if the map's last key/value pair is not equal to the given entry.
|
void |
hasLastKey(Object key)
Deprecated.
Fails if the map's last key is not equal to the given key.
|
SortedMapSubject |
named(String format,
Object... args)
Deprecated.
|
comparingValuesUsing, containsAtLeast, containsAtLeastEntriesIn, containsEntry, containsExactly, containsExactly, containsExactlyEntriesIn, containsKey, doesNotContainEntry, doesNotContainKey, hasSize, isEmpty, isEqualTo, isNotEmpty
actual, actualAsString, actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toString
@Deprecated public SortedMapSubject 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 using Strings.lenientFormat
.
Note this only supports the %s
specifier.
named
in class Subject<MapSubject,Map<?,?>>
format
- a template with %s
placeholdersargs
- the object parameters which will be applied to the message template.public void hasFirstKey(@NullableDecl Object key)
public void hasFirstEntry(@NullableDecl Object key, @NullableDecl Object value)
public void hasLastKey(@NullableDecl Object key)
Copyright © 2019. All rights reserved.