package org.junit.jupiter.api;
import static org.junit.jupiter.api.AssertionUtils.buildPrefix;
import static org.junit.jupiter.api.AssertionUtils.doublesAreEqual;
import static org.junit.jupiter.api.AssertionUtils.fail;
import static org.junit.jupiter.api.AssertionUtils.floatsAreEqual;
import static org.junit.jupiter.api.AssertionUtils.nullSafeGet;
import static org.junit.jupiter.api.AssertionUtils.objectsAreEqual;
import java.util.function.Supplier;
class AssertNotEquals {
private AssertNotEquals() {
}
static void assertNotEquals(byte unexpected, byte actual) {
assertNotEquals(unexpected, actual, (String) null);
}
static void assertNotEquals(byte unexpected, byte actual, String message) {
if (unexpected == actual) {
failEqual(actual, message);
}
}
static void assertNotEquals(byte unexpected, byte actual, Supplier<String> messageSupplier) {
if (unexpected == actual) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(short unexpected, short actual) {
assertNotEquals(unexpected, actual, (String) null);
}
static void assertNotEquals(short unexpected, short actual, String message) {
if (unexpected == actual) {
failEqual(actual, message);
}
}
static void assertNotEquals(short unexpected, short actual, Supplier<String> messageSupplier) {
if (unexpected == actual) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(int unexpected, int actual) {
assertNotEquals(unexpected, actual, (String) null);
}
static void assertNotEquals(int unexpected, int actual, String message) {
if (unexpected == actual) {
failEqual(actual, message);
}
}
static void assertNotEquals(int unexpected, int actual, Supplier<String> messageSupplier) {
if (unexpected == actual) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(long unexpected, long actual) {
assertNotEquals(unexpected, actual, (String) null);
}
static void assertNotEquals(long unexpected, long actual, String message) {
if (unexpected == actual) {
failEqual(actual, message);
}
}
static void assertNotEquals(long unexpected, long actual, Supplier<String> messageSupplier) {
if (unexpected == actual) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(float unexpected, float actual) {
assertNotEquals(unexpected, actual, (String) null);
}
static void assertNotEquals(float unexpected, float actual, String message) {
if (floatsAreEqual(unexpected, actual)) {
failEqual(actual, message);
}
}
static void assertNotEquals(float unexpected, float actual, Supplier<String> messageSupplier) {
if (floatsAreEqual(unexpected, actual)) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(float unexpected, float actual, float delta) {
assertNotEquals(unexpected, actual, delta, (String) null);
}
static void assertNotEquals(float unexpected, float actual, float delta, String message) {
if (floatsAreEqual(unexpected, actual, delta)) {
failEqual(actual, message);
}
}
static void assertNotEquals(float unexpected, float actual, float delta, Supplier<String> messageSupplier) {
if (floatsAreEqual(unexpected, actual, delta)) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(double unexpected, double actual) {
assertNotEquals(unexpected, actual, (String) null);
}
static void assertNotEquals(double unexpected, double actual, String message) {
if (doublesAreEqual(unexpected, actual)) {
failEqual(actual, message);
}
}
static void assertNotEquals(double unexpected, double actual, Supplier<String> messageSupplier) {
if (doublesAreEqual(unexpected, actual)) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(double unexpected, double actual, double delta) {
assertNotEquals(unexpected, actual, delta, (String) null);
}
static void assertNotEquals(double unexpected, double actual, double delta, String message) {
if (doublesAreEqual(unexpected, actual, delta)) {
failEqual(actual, message);
}
}
static void assertNotEquals(double unexpected, double actual, double delta, Supplier<String> messageSupplier) {
if (doublesAreEqual(unexpected, actual, delta)) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(char unexpected, char actual) {
assertNotEquals(unexpected, actual, (String) null);
}
static void assertNotEquals(char unexpected, char actual, String message) {
if (unexpected == actual) {
failEqual(actual, message);
}
}
static void assertNotEquals(char unexpected, char actual, Supplier<String> messageSupplier) {
if (unexpected == actual) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
static void assertNotEquals(Object unexpected, Object actual) {
assertNotEquals(unexpected, actual, (String) null);
}
static void assertNotEquals(Object unexpected, Object actual, String message) {
if (objectsAreEqual(unexpected, actual)) {
failEqual(actual, message);
}
}
static void assertNotEquals(Object unexpected, Object actual, Supplier<String> messageSupplier) {
if (objectsAreEqual(unexpected, actual)) {
failEqual(actual, nullSafeGet(messageSupplier));
}
}
private static void failEqual(Object actual, String message) {
fail(buildPrefix(message) + "expected: not equal but was: <" + actual + ">");
}
}