Mock overloaded method problems encountered in unit testing

To test the throwing of an exception, the unit test output is a record of the verification Logger. The log of the exception records LogInfo, but one parameter is usually used in LogInfo. When catching this exception, an overloaded method with two parameters is called, resulting in Mock fails all the time.

Success after changing Mock parameters.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324901762&siteId=291194637