There are a number of times when we expect a method to
be called and we are not bothered what the arguments are.
In steps the .expect(object,C.ANY_ARGS) however, there are
also a number of occasions where we expect a method to be
called multiple times and we still dont care whats passed
nor do we actually know how many times its going to be
called. Ie when we mock the apache.commons.logger we
may not care what we log or how often. Is it possible to
create an expectMultiple(object,C.ANY_ARGS) type method?
You could, if you desired, count the number of calls and
This is not necessarily a problem in that you could created a
MockLogger() class instead of using the dynamic mock of the
Log interface and just implemented each method with stubs.
Log in to post a comment.