petergtz / pegomock

Pegomock is a powerful, yet simple mocking framework for the Go programming language
Apache License 2.0
252 stars 28 forks source link

Extracting separate ArgumentMatcher ifc with no FailureMessage #114

Closed yhrn closed 3 years ago

yhrn commented 3 years ago

Since FailureMessage() is only used for invocation count matching this will significantly simplify writing custom argument matchers - one less method to implement, no need for mutable state and synchronization.

petergtz commented 3 years ago

I think that's a great idea! I think when I introduced the matcher concept it wasn't clear yet, that the 2 use cases "argument match" and "invocation count" matcher are completely distinct. With that knowledge, we should really separate them.

A couple comments. Will add them in the diff.

petergtz commented 3 years ago

Nice! Thanks again, @yhrn.