开发者

testing asynchronous callbacks with Rhino Mocks

Here's what I'm trying to do:

I have a class A and an interface B. A calls B to update A's property someProperty.

interface B
{
    IAsyncResult BeginSetProperty(string str, AsyncCallback callback); 
    bool EndSetProperty(IAsyncResult result);
}

A calls B with b.BeginSetProperty(str, someCallback) where someCallback calls SomeProperty = b.EndSetProperty(result).

How do I stub B so that s开发者_如何学运维omeProperty will be set?


You may checkout the following blog post.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜