MCPcopy Index your code
hub / github.com/assertj/assertj / assertHasSize

Method assertHasSize

src/main/java/org/assertj/core/internal/Maps.java:126–129  ·  view source on GitHub ↗

Asserts that the number of entries in the given Map is equal to the expected one. @param info contains information about the assertion. @param actual the given Map. @param expectedSize the expected size of actual. @throws AssertionError if the given Map is {@code nul

(AssertionInfo info, Map<?, ?> actual, int expectedSize)

Source from the content-addressed store, hash-verified

124 * @throws AssertionError if the number of entries in the given {@code Map} is different than the expected one.
125 */
126 public void assertHasSize(AssertionInfo info, Map<?, ?> actual, int expectedSize) {
127 assertNotNull(info, actual);
128 checkSizes(actual, actual.size(), expectedSize, info);
129 }
130
131 /**
132 * Asserts that the number of entries in the given {@code Map} has the same size as the other {@code Iterable}.

Calls 3

assertNotNullMethod · 0.95
checkSizesMethod · 0.80
sizeMethod · 0.45