Upgraded to 2013.3.1015.0 - Multiple Tests Failing.

3 posts, 0 answers
  1. Steve
    Steve avatar
    13 posts
    Member since:
    Feb 2013

    Posted 24 Oct 2013 Link to this post

    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)

    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. Steve
    Steve avatar
    13 posts
    Member since:
    Feb 2013

    Posted 24 Oct 2013 Link to this post

    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

  3. Kaloyan
    Kaloyan avatar
    880 posts

    Posted 25 Oct 2013 Link to this post

    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.

    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.
Back to Top