NMock annoyances

time to read 1 min | 122 words

After praising it, I can't help but point some of the annoying parts.

The one thing that annoys me in NMock is setting expectation for a method call that has arguments. The problem is that there is no easy way to make NMock aware of method overloading, so it can't distinguish between MethodSample(string s) and MethodSample(int i).

Currently I work around it by using mockObj.Expect("MethodSample",new IsTypeOf(typeof(string))), but that just looks ugly, and I don't think that it would solve the problem if I would run into a real overloading scenario. Currently I've not solution for that, anyone has ideas?

[Listening to: רמי קליינשטיין - ריטה - צל הירח - - (04:26)]