The assert statement is used for comparing the result from the original method with the expected result, and then passing or failing the test based on the match. Whatever the result produced by the method may be, the end result of the test method depends on the return value of the assert method. The assert statement takes care of setting the result. There are multiple overloaded methods supported by the
Assert statement to set the return value to
Inconclusive. If the assert statement is not present in the test method, the test method will always return a
Pass value. If there are many assert statements in the test method, the test will be in
Pass state until one of the assert statements returns
In the preceding ...