You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to Mockito, I just had an assertion failure that I just had a failure thanks to Mockito told me of an issue in my code that I need to fix. The error message looked like this:
cLogger.saveError("Error", <any string>);
Never wanted here:
-> at au.org.greekwelfaresa.idempiere.bpmodels.test.MBPartnerLocationTest.lambda$1(MBPartnerLocationTest.java:118)
But invoked here:
-> at org.compiere.model.PO.save(PO.java:2155)
-> at org.compiere.model.PO.save(PO.java:2155)
It occurred to me that it might be useful debugging to include not only the place where the invocation happened, but the arguments that were provided for each invocation. Because of the anyString() matcher, it is not immediately obvious what they are - if you're using exact match semantics, then you can infer the parameters from the first line, but that's not possible when you're using a matcher.
This feature could be added on all failure messages, or else only on failure messages when matchers are being used (as it is redundant when you're using exact match).
The text was updated successfully, but these errors were encountered:
Thanks to Mockito, I just had an assertion failure that I just had a failure thanks to Mockito told me of an issue in my code that I need to fix. The error message looked like this:
It occurred to me that it might be useful debugging to include not only the place where the invocation happened, but the arguments that were provided for each invocation. Because of the
anyString()
matcher, it is not immediately obvious what they are - if you're using exact match semantics, then you can infer the parameters from the first line, but that's not possible when you're using a matcher.This feature could be added on all failure messages, or else only on failure messages when matchers are being used (as it is redundant when you're using exact match).
The text was updated successfully, but these errors were encountered: