I am trying to use JustMock on a view-model in a silverlight application. The structure of the solution is basically as follows:
Both projects are Silverlight Class projects with Silverlight 5. The test project is using NUnitLite 1.0 libraries (also tried it with NUnit3.0) and has a reference to Telerik.JustMock.Silverlight.dll. I have a license for the commercial version but have not enabled the profiler. A sample unit test is below:
var mockDummy = Mock.Create<IDummy>();
var x =
var result = x.Len(
And this is what I tried testing:
But this is the error I get:
System.TypeInitializationException : The type initializer for 'Telerik.JustMock.Mock' threw an exception.
----> System.InvalidOperationException : Telerik.JustMock.Silverlight should only be used inside the Silverlight runtime. For all other runtimes reference Telerik.JustMock instead.
But since the test project is a SilverLight class library, I cannot add a reference to Telerik.JustMock.dll.
I'm sure I'm missing something but just can recognize it at the moment. Any advice would be much appreciated.