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.
精彩评论