Last post Apr 03, 2011 08:22 AM by HeartattacK
Apr 02, 2011 11:11 PM|castlehills|LINK
I'm using the mock framework to unit test some methods. I came across some methods that use delegates. I did not find a way to setup these delegates to return the objects that I want. The mock framework does not support it as far as I know. Is this supported
in other mock frameworks like nMock?
Apr 03, 2011 05:52 AM|HeartattacK|LINK
You haven't mentioned what mocking framework you're using. And what sort of delegates are you trying to mock? Some code examples will help us figure out what might help you.
Apr 03, 2011 08:09 AM|castlehills|LINK
The frame work is moq.
This is a function delegate with lamda expression.
Apr 03, 2011 08:22 AM|HeartattacK|LINK
Please show us the code of the class / interface you're looking to test and mention what dependency you're trying to mock. Your description is ambiguous and we could only guess at what you're trying to achieve without seeing your code.