views:

332

answers:

3

Hi,

I'm using the Silverlight UnitTest framerwork does anyone have a good example have how to unit test an application with it? I'm using it quite successfully to unit test a silverlight class library.

Any pointers and links would be greatly appreciated.

Thanks, Nath

+2  A: 

Nath, The Silverlight Control Toolkit uses it. Why not take a look at the unit tests there?

http://www.codeplex.com/silverlight

Page Brooks
Hi Page,That was my first thought, but that seemed to be more a custom controls, where as I'm more looking for a single application level example.Cheers,Nath
DeletedAccount
+6  A: 

Hi,

I've written a couple of blog posts about the Silverlight Unit Testing Framework. The first one covers how to test asynchronous code using the asynchronous attribute and some of the more advanced features of the framework. The post can be found at http://jonas.follesoe.no/UnitTestingAsynchronousSilverlightCode.aspx

The second post is about organizing your tests using the Tag-attribute. This enables you to have unit/integration/performance/UI tests in the same test suite, but only execute one specific category at a time. The blog post can be found at http://jonas.follesoe.no/EfficientTestingInSilverlight2UsingTags.aspx

Jonas Follesø
Pretty cool.. thanks for sharing :o)
DeletedAccount
+1  A: 

You should also try to use SilverUnit for real Silverlight unit testing, it is a really easy to use framework, which also protects you from the intricacies of Silverlight event processing.