Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Asynchronous Tests in Silverlight – Run Callbacks on UI Thread

AddThis Social Bookmark Button
I’ve just started to set up some unit tests for a pet project I’m playing with to wrap the GoogleReader.API for Silverlight clients. Once you’ve downloaded the latest Silverlight Toolkit you’ll have access to the Silverlight Unit Testing Framework – the great thing about this framework is that it makes writing tests that call asynchronous methods a breeze – well, I was actually becalmed for a while until I worked out a few tricks to get things working. The framework lets me write tests that look something like,
[TestClass]
public class CommandTests: SilverlightTest
{ [Asynchronous]
[TestMethod]
public void Can_Login()
{ ConnectCommand command = new ConnectCommand();
command.BeginConnect("myemail", "mypassword", (result) =>
{
Home : Blog List : Andrew Tokeley : Asynchronous Tests in Silverlight – Run Callbacks on UI Thread