Package testUtils
Class Assertion
java.lang.Object
testUtils.Assertion
Utility class for assertions with logging using Log4j2.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
assertEquals
(T actual, T expected, String message) Asserts that two values are equal and logs the result.static void
assertTrue
(boolean condition, String message) Asserts that a condition is true and logs the result.
-
Constructor Details
-
Assertion
public Assertion()
-
-
Method Details
-
assertTrue
Asserts that a condition is true and logs the result.- Parameters:
condition
- the condition to checkmessage
- the assertion message
-
assertEquals
Asserts that two values are equal and logs the result.- Type Parameters:
T
- the type of the values- Parameters:
actual
- the actual valueexpected
- the expected valuemessage
- the assertion message
-