A couple of people have asked if I could share the code for my experimental Xunit.net silverlight v1.1 test runner. Actually, the stuff I did was fairly simple and not very polished, but I'll should get someone else started on building a real runner out of it :-)
You can download the code here.
Some things to keep in mind:
- The zip doesn't contain all the code. Only the silverlight specific parts:
- The sample test HTML page and its JS scripts
- The silverlight control XAML
- The TestRunnerView, a Canvas derived class that implements the actual silverlight control
- This means you still need to go and grab the XUnit distribution and get it to compile with Silverlight on your own. Here are some tips, though:
- If you're using VS2005 to build it, you need to build against the silverlight assemblies. Here's a good starting point.
- On the Xunit.net solution, I got rid of everything except the core xunit.dll assembly code. It's easier to get started that way.
- Get rid of the xunit\Sdk\XmlVisitor.cs file, as it uses XmlDocument and friends and won't compile on silverlight. You don't need it right away, but I'm sure someone will rewrite it to use an XmlReader/Writer instead.
- There are other changes here and there you need to make to get the code to compile, just follow the compiler errors :-).