tag:blogger.com,1999:blog-11388923.post4689691790104388880..comments2024-03-24T20:54:16.021-05:00Comments on Bart's Blog: Using assertions within your mockito ArgumentMatcher implementationsAnonymoushttp://www.blogger.com/profile/01154315948247678050noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-11388923.post-86152374877511377312009-01-23T10:45:00.000-06:002009-01-23T10:45:00.000-06:00I've posted a comment on the mockito list to furth...I've posted a comment on the mockito list to further delve into the issue of why assertions should not be used within your custom ArgumentMatcher implementations. You can follow the conversation at http://groups.google.com/group/mockito/browse_thread/thread/ce196f0460aa27cb.Anonymoushttps://www.blogger.com/profile/01154315948247678050noreply@blogger.comtag:blogger.com,1999:blog-11388923.post-45199597959754495192009-01-22T23:43:00.000-06:002009-01-22T23:43:00.000-06:00I didn't pick up on that. Thanks for the heads up...I didn't pick up on that. Thanks for the heads up. Unfortunately, the documentation doesn't state why you shouldn't use assertions. Returning false doesn't give you any information about what exactly did not match. I wonder if it has something to do with allowing the verify() to do the assertion and throw the verification exception.Anonymoushttps://www.blogger.com/profile/01154315948247678050noreply@blogger.comtag:blogger.com,1999:blog-11388923.post-57167772252549055862009-01-22T23:08:00.000-06:002009-01-22T23:08:00.000-06:00Maybe I misread, but doesn't the JavaDoc explicitl...Maybe I misread, but doesn't the JavaDoc explicitly say <I>not</I> to use an assertion within the Matcher. I mean... if it works - great! I just wonder why it was called out specifically.Anonymoushttps://www.blogger.com/profile/11522484894299243226noreply@blogger.com