Skip to main content
Unit testing in Silverlight part 3
Entry Date: Rate:
Site:
Keywords:
RSS Description:
In the second blog post I showed how to create a wrapper around the WebClient class, the TestableWebClient, so we can actually test code doing asynchronous web access. The part I didn’t really explain was the unit test itself. The unit test code looked likes this:
Comments:

SL calls to services are asynchronous... that can make a bit difficult unit testing (you can simulate that using mocks, but sometimes you need to test a real call to a service).

In order to test asynchronous calls the testing framework has some good enqueoperations support.