开发者

How to mock arbitrary behavior with Rhino Mocks?

I'm trying to mock a data layer method. The method takes a string and two lists as arguments, and the method populates those lists from the results of a stored proc. Also, I'm still on C# 2.0 with VS2005, and I'm using Rhino Mocks 3.5 for .NET 2.0. If possible, it would be nice to use the AAA format.

So yeah, all I 开发者_Python百科want to do is mock an interface method that will add a couple of fake objects to the argument lists and return. Unfortunately, after reading the Rhino Mocks documentation, I have little to no idea how to do this. Rhino is a unintelligible puzzle box to me and I'm powerless to do anything without examples; examples that I can't find.

Anyone have any idea how I can do this?


You can use the AAA syntax with .NET 2.0, it's just a little bit more typing. See Using the AAA syntax in C# 2.0

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜