Sample unit tests project

Nov 9, 2013 at 6:28 AM
First of all thank you for that very convenient R# extension.

It would be nice to have a sample silverlight project with a class library that is tested by:
  1. MSTest tests,
  2. NUnit tests,
  3. XUnit tests.
since they are supported. To find out what the best we can achieve and what exact versions of that frameworks are supported and how to configure the silverlight project, what assemblies to include, what extensions to install.

For example, I have an exception after
UnitTestSystem.RegisterUnitTestProvider(...)
for both NUnit and XUnit.
So I can't see test results in the default unit test runner (silverlight application). Not everyboady uses R#, so they need to detect test failures somehow.
Or I don't know what version of
Microsoft.Silverlight.Testing.dll and
Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll
to include.
I am using MSTest for now, but I would like to get parameterized tests support with NUnit or XUnit. Tried NUnit - Resharper unit test runner ignores TestCases. Maybe it is a configuration problem (wrong assemblies, etc), or maybe they are not supported, I don't know. Lot of questions.

Thanks in advance.
Nov 9, 2013 at 10:18 AM
Found some tests in VS2010 folder, sorry for my blindness.
Coordinator
Nov 9, 2013 at 1:00 PM
As for running the tests you just need to reference the correct assemblies and start writing tests.
The "UnitTestSystem.RegisterUnitTestProvider(...) " stuff is only for when you want to use standard Silverlight test runner (in browser).

And I'm sorry but TestCases will probably not work with any framework.
I'm not sure if StatLight supports it and even so I'm pretty sure AgUnit doesn't return the results correctly to R#.

If you want to take a look at it. This is the file that is the main integration point between R# and StatLight:
https://github.com/sdekock/AgUnit/blob/master/src/AgUnit.Runner.Resharper80.TaskRunner/UnitTestRunner/Silverlight/SilverlightUnitTestTaskRunner.cs
Developer
Nov 9, 2013 at 4:45 PM
StatLight implemented basic TestCase attribute support for Nunit. Pretty sure xunit won't work, but I'm not sure how xunit implements it (and if the xunit contrib has it or not)

Hope that helps (a little).