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

Method assertNotEmpty

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

Asserts that the given Map is not 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 empty.

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

Source from the content-addressed store, hash-verified

107 * @throws AssertionError if the given {@code Map} is empty.
108 */
109 public void assertNotEmpty(AssertionInfo info, Map<?, ?> actual) {
110 assertNotNull(info, actual);
111 if (!actual.isEmpty()) {
112 return;
113 }
114 throw failures.failure(info, shouldNotBeEmpty());
115 }
116
117 /**
118 * Asserts that the number of entries in the given {@code Map} is equal to the expected one.

Calls 4

assertNotNullMethod · 0.95
shouldNotBeEmptyMethod · 0.80
isEmptyMethod · 0.65
failureMethod · 0.45