Hi Patrick,

On Wed, May 4, 2011 at 3:44 PM, Patrick Steele <[email protected]> wrote:
> Why create a StrictMock of List<T>?

To test the interaction of a class with onw of its inner members.

> For one thing, the Contains
> method isn't virtual so you can't set expectations on it (nor stub
> it's behavior).

Got it.

> Second, I tend to avoid StrictMock's.
[cut]

Uhm... could you suggest me an alternative?

> What's the goal of what you're trying to test?  What class is being
> tested in this scenario?

I have a class called FooProvider which implements some selection
logic on a database table Foo. The FooProvider instance holds a
blacklist (which is the List<Foo> I wrote before) so when I ask it
"give me the next 10 Foo instances" the provider run a query over the
database and exclde all the blacklisted ones.

Thanks again,
Giulio

--

-- 
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