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

Method assertEmpty

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

Asserts that the given Map is empty. @param info contains information about the assertion. @param actual the given Map. @throws AssertionError if the given Map is null. @throws AssertionError if the given Map is not empty.

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

Source from the content-addressed store, hash-verified

91 * @throws AssertionError if the given {@code Map} is not empty.
92 */
93 public void assertEmpty(AssertionInfo info, Map<?, ?> actual) {
94 assertNotNull(info, actual);
95 if (actual.isEmpty()) {
96 return;
97 }
98 throw failures.failure(info, shouldBeEmpty(actual));
99 }
100
101 /**
102 * Asserts that the given {@code Map} is not empty.

Calls 4

assertNotNullMethod · 0.95
isEmptyMethod · 0.65
failureMethod · 0.45
shouldBeEmptyMethod · 0.45