I'm trying some mocking frameworks for c#.
I created an Windows Phone 8.1 project, then added an 8.1 Unit Test Project
Installed Rhinos with the nuget package installed. Trying to make an simple stub test:
public class MyTest
{
public int value()
{
return 23;
}
}
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
MyTest item;
item = MockRepository.GenerateStub<MyTest>();
item.Stub(x => x.value()).Return(240);
Assert.Equals(239, item.value());
}
}
But when I run the tests I get the following error:
Result Message: Test method UnitTestApp1.UnitTest1.TestMethod1 threw exception:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
Result StackTrace:
at Rhino.Mocks.MockRepository.GenerateStub[T](Object[] argumentsForConstructor)
at UnitTestApp1.UnitTest1.TestMethod1()
Where is the problem?
Note: I'm starter with Visual Studio and Windows Phone development so please explain your answer