For 11/140 tests we are using JusMock. I just installed the latest version. When I enable the profiler and run all test though, they all break. I have VS2010 ultimate and VS2013 ultimate. This is the error I am getting.
When i disable the profiler, all of the non-justmock tests pass but the 11 fail. When I check in my code the build server says all tests pass, so I know it's just something on my machine causing the problem. Does anyone know how to fix this?
Test Name: BackButtonTest
Test FullName: BBA.POS.Test.NewTransactionViewModelTest.BackButtonTest
Test Source: c:\TFS\POS\POSApp\v3-Phase2\Source\BBA.POS.Test\NewTransactionViewModelTest.cs : line 995
Test Outcome: Failed
Test Duration: 0:00:00.7688022
Result Message:
Test method BBA.POS.Test.NewTransactionViewModelTest.BackButtonTest threw exception:
System.TypeInitializationException: The type initializer
for
'.'
threw an exception. ---> System.ArgumentNullException: Value cannot be
null
.
Parameter name: field
TestCleanup method BBA.POS.Test.NewTransactionViewModelTest.MyTestCleanup threw exception. System.TypeInitializationException: System.TypeInitializationException: The type initializer
for
'.'
threw an exception. ---> System.ArgumentNullException: Value cannot be
null
.
Parameter name: field.
Result StackTrace:
at System.Dynamic.Utils.ContractUtils.RequiresNotNull(Object value, String paramName)
at System.Linq.Expressions.Expression.Field(Expression expression, FieldInfo field)
at ..[](String , Func`1& , Action`1& )
at ...cctor()
--- End of inner exception stack trace ---
at ..(Action )
at Telerik.JustMock.Mock.Reset()
at BBA.POS.Test.NewTransactionViewModelTest.BackButtonTest()
in
c:\TFS\POS\POSApp\v3-Phase2\Source\BBA.POS.Test\NewTransactionViewModelTest.cs:line 241
TestCleanup Stack Trace
at System.Dynamic.Utils.ContractUtils.RequiresNotNull(Object value, String paramName)
at System.Linq.Expressions.Expression.Field(Expression expression, FieldInfo field)
at ..[](String , Func`1& , Action`1& )
at ...cctor()
--- End of inner exception stack trace ---
at ..(Action )
at Telerik.JustMock.Mock.Reset()
at BBA.POS.Test.NewTransactionViewModelTest.MyTestCleanup()
in
c:\TFS\POS\POSApp\v3-Phase2\Source\BBA.POS.Test\NewTransactionViewModelTest.cs:line 99
When i disable the profiler, all of the non-justmock tests pass but the 11 fail. When I check in my code the build server says all tests pass, so I know it's just something on my machine causing the problem. Does anyone know how to fix this?