The Assert methods in JUnit are all placed in the Assert class, summarizing the classification of the Assert methods in the JUnit class.
1.asserttrue/false ([String message,]boolean condition);
To see if the variable is false or True, the test succeeds if the value of the variable being viewed by Assertfalse () is false, and if True fails, asserttrue () is the opposite;
2.fail ([String message,]);
Directly used to throw an error.
3.assertEquals ([String message,]object expected,object Actual);
You can specify an output error message if you want to determine equality.
The first parameter is the expected value, and the second argument is the actual one.
This method has multiple implementations for each variable
4.assertnotnull/null ([String message,]object obj);
Interpret whether an object is non-empty (not empty).
5.assertsame/notsame ([String message,]object expected,object Actual);
Determines whether two objects point to the same object. Look at the memory address.
7.failnotsame/failnotequals (String message, object expected, object actual)
Output error messages when they do not point to the same memory address or are not equal.
Note that the information is required, and the output is formatted.