This is a migrated thread and some comments may be shown as answers.

Upgraded to 2013.3.1015.0 - Multiple Tests Failing.

2 Answers 40 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 24 Oct 2013, 06:48 PM
We upgraded to Visual Studio 2013 and along with it, the latest version of JustMock (2013.3.1015.0)

After the upgrade, 3 of our tests started failing.

The code that kills it:

var sp = new ClaimsPrincipal();
        Mock.Arrange(() => sp.FindFirst("CONTROLLER/CONTROLLER")).Returns(new Claim("CONTROLLER/CONTROLLER", "0"));
        Mock.Arrange(() => System.Threading.Thread.CurrentPrincipal)
                .IgnoreInstance()
                .Returns(sp);

The exception it throws:

Telerik.JustMock.MockException: Type System.Threading.Thread does not support mocking of static members due to limitations in CLR.




It blows on the bolded line, which worked previously...

We have attached JustMock to 2013 CodeCoverage/Intellitrace profiler options, but there is no Visual Studio 2013 Profiler selectable as there was with VS2012.  (I believe the elevated permissions are working as expected, because all of our other .Net mscorelib tests are passing fine)

Any thoughts?


2 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 24 Oct 2013, 07:01 PM
Note, I have double-checked my references.

All of my tests were failing at first, until I made sure everything was updated.

Now most tests run, just none that mock system.threading.thread.currentprincipal

0
Kaloyan
Telerik team
answered on 25 Oct 2013, 08:17 AM
Hello Steve,

Thank you for reporting this issue. It is indeed a bug in JustMock.

Our development team is currently working on the fix. We will try our best in order to ship it with the next official JustMock release, due next week

I hope this helps.

P.S. For reporting a bug we have granted you some Telerik points.

Regards,
Kaloyan
Telerik
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
Tags
General Discussions
Asked by
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or