I am working with Silverlight Unit Testing i need to test a function which will open a childwindow i need to handle result of the childwindow call back for further test
is it possible to handle child window callback from silverlight unit testing framework ?
No, there isn’t a way to click the close/ok button in a child window. However, you can work around this using a DialogService interface. Laurent Buignon who created the MVVMLight toolkit talks about this in his Mix 11 presentation. Once you interface the calls, instead of childWindow.Open(), you can mock the ok or cancel action (I like to use Moq for that). If you want to go even further, you can use Ioc and DependencyInjection to inject the interface.
Here are some other helpful links:
http://csharperimage.jeremylikness.com/2010/01/simple-dialog-service-in-silverlight.html
http://blog.roboblob.com/2010/01/19/modal-dialogs-with-mvvm-and-silverlight-4/
http://www.wintellect.com/CS/blogs/jlikness/archive/2010/02/02/using-moq-with-silverlight-for-advanced-unit-tests.aspx