|
From: <thi...@gm...> - 2005-05-23 12:00:30
|
Hi,
I've been digging into nmock code this week end. I'd just like a
comment about how is SetupResult is supposed to work so I can really
understand what is intented.
Internally a SetupResult("methodName",xxx) after another
SetupResult("methodName") will simply void the effects of the first
call (as the key used to store the expectations is just the method
name, and previous setup will get erased).
This means that a dynamic mock with :
SetupResult("Item","InvokedWithIntParam",typeof(int))
SetupResult("Item","InvokedWithStringParam",typeof(string))
will always return "InvokedWithStringParam", whatsoever the type of
arguments passed.
This seems to be the cause of NMO-37
Is it what is expected ? At first sight I think we should have a key
based on the whole signature rather than just the method name here.
regards
Thibaut
|