1 package com.fermod.contract;
3 import static org.junit.jupiter.api.Assertions.assertEquals;
4 import static org.junit.jupiter.api.Assertions.assertFalse;
5 import static org.junit.jupiter.api.Assertions.assertNotEquals;
7 import org.junit.jupiter.api.DisplayName;
8 import org.junit.jupiter.api.Tag;
9 import org.junit.jupiter.api.Test;
26 @DisplayName(
"Equals Test")
37 T createNotEqualValue();
42 @DisplayName(
"Equals Itself - True")
45 T value = createValue();
46 assertEquals(value, value);
53 @DisplayName(
"Equals Null - False")
56 T value = createValue();
57 assertFalse(value.equals(
null));
64 @DisplayName(
"Equals Different - False")
67 T value = createValue();
68 T differentValue = createNotEqualValue();
69 assertNotEquals(value, differentValue);
70 assertNotEquals(differentValue, value);
default void notEqualNullValue()
Compares the created value to a.
default void equalValueItself()
Compares the created value to itself to test that the equality holds.
default void notEqualDifferentValue()
Compares the created value to a different value to test that the equality does not hold.
The Testable class represents a testable type used by other classes for the use of their own tests.
This interface defines tests to verify that the objects implements correctly the.