开发者

testing asynchronous callbacks with Rhino Mocks

开发者 https://www.devze.com 2023-02-25 23:46 出处:网络
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.

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

精彩评论

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

关注公众号