We are writing unittest'sCodeI accidentally wrote assert. areequal as assert. equals, and the results made me suffer for a while.
We all know that assert. Equals (Object A, object B) is a correct method that is equal.
However, assert. Equals (Object A, object B) is indeed not equal.
According to the data, assert. Equals inherits from Microsoft's object. Equals, so it is inferred that the result is true in any case;
But I still don't quite understand. I don't know which of the following questions can be answered:
1. How to infer that the assert. Equals (Object A, object B) results are true;
2. Microsoft uses objects. equals (Object A), why does assert use two parameters assert. equals (Object A, object B), which is not easy to confuse assert. areequal and assert. equals?
In short, be careful when using assert. areequal in the future. Do not make any mistakes.