expectCallCount(..) but only with specific arguments?
Posted: Sun Dec 10, 2006 5:18 am
SimpleTest of course 
I can make an expectation about a single call with a known set of arguments. I can make an expectation about a minimum, maximum of fixed call count on a method. I can make an expectation about the arguments given at a known call time on a method. But how can I more broadly just say that I expect method A to be called 3 times with argument B? The method may be called any number of times with other arguments but only 3 times with these certain arguments.
I can't see a way to do it without committing myself to the exact time it will be called using expectAt(..)... I'll do this but it feels a bit too likely to break as the code evolves even if technically what's happening is correct. Is it possible to do what I want?
I can make an expectation about a single call with a known set of arguments. I can make an expectation about a minimum, maximum of fixed call count on a method. I can make an expectation about the arguments given at a known call time on a method. But how can I more broadly just say that I expect method A to be called 3 times with argument B? The method may be called any number of times with other arguments but only 3 times with these certain arguments.
I can't see a way to do it without committing myself to the exact time it will be called using expectAt(..)... I'll do this but it feels a bit too likely to break as the code evolves even if technically what's happening is correct. Is it possible to do what I want?