what areas do you see where clean up could occur?  Phrased another way, what
is crowded?

On Wed, Apr 1, 2009 at 8:33 AM, Shane Courtrille
<[email protected]>wrote:

> Why would we want ANOTHER way to do something that is already possible?
> The Rhino Mocks API is already getting kind of crowded...
>
> On Wed, Apr 1, 2009 at 7:23 AM, Koen Verheyen <[email protected]>wrote:
>
>>
>> Hi Ayende,
>>
>> Dunno if I’m asking for a bit of support here or a feature request.
>>
>> What I wanna do a lot with Rhino Mocks is the following: I set an
>> expectation on a dependency (dynamic mock) on a method that takes
>> parameters, but I have a lot of cases where I don’t know one of the
>> parameters (usually a reference that is created in the scope of the
>> public method I’m testing).
>>
>> I found two ways of doing this, with “Constraints” and “WhenCalled”:
>> swimlaneRepository.Expect(r => r.QuerySwimlanesToRemove(Guid.Empty,
>> null)).Constraints(Is.Equal(processDefinitionId), Is.Anything());
>>
>> swimlaneRepository.Expect(r => r.QuerySwimlanesToRemove(Guid.Empty,
>> null)).IgnoreArguments().WhenCalled(
>>    mo =>
>>    {
>>        Assert.AreEqual(processDefinitionId, mo.Arguments[0]);
>>    });
>>
>> … but would like to write it more or less, like this:
>>
>> swimlaneRepository.Expect(r => r.QuerySwimlanesToRemove
>> (processDefinitionId, null)).IgnoreArguments(1);
>>
>> ... where “1” points to the second parameter and ignoring only that
>> one, but still expecting the value of the first parameter (index 0).
>> The argument of “IgnoreArguments” would thus be “params int[]”
>>
>> Is there already something like this in Rhino mocks? If not, I think
>> it’d be a nice feature request (if technically possible)...
>>
>> Thanks
>>
>> Koen
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to