package org.junit.jupiter.api;
import static org.junit.jupiter.api.AssertionUtils.buildPrefix;
import static org.junit.jupiter.api.AssertionUtils.nullSafeGet;
import java.util.function.Supplier;
class AssertNotNull {
private AssertNotNull() {
}
static void assertNotNull(Object actual) {
assertNotNull(actual, (String) null);
}
static void assertNotNull(Object actual, String message) {
if (actual == null) {
failNull(message);
}
}
static void assertNotNull(Object actual, Supplier<String> messageSupplier) {
if (actual == null) {
failNull(nullSafeGet(messageSupplier));
}
}
private static void failNull(String message) {
Assertions.fail(buildPrefix(message) + "expected: not <null>");
}
}