I am creating a c# application that has an embedded webbrowser control. From javascript I am calling a c# method and passing a javascript callback. I am using the dynamic technique from this answer:
public void CallbackTest(object callback)
{
dynamic callbackFunc = callback;
callbackFunc("Hello!");
}
My problem is how would I go about unit testing this method? How do I mock (or fake) the callback parameter? For what it's worth, my mocking library of choice is Moq.