Bad Class Token in Elevated mode

4 posts, 0 answers
  1. Ruud
    Ruud avatar
    2 posts
    Member since:
    May 2011

    Posted 03 May 2011 Link to this post

    Hello,

    I'm currently using the trial version to investigate if we want to use JustMock as our new mocking framework.
    We especially like the 'Elevated' mode where we can mock mscorlib classes, etc.

    However when I try to run the justmock tests (MSTest in VS2008) the Visual Studio test runner stops and throws the following error:
    "Unit Test Adapter threw exception: Bad class token.."

    This is my dev setup:
    Windows XP
    Visual Studio 2008
    .NET Framework 3.5 SP1
    JustMock trial

    Is there a solution for this problem? If so, please let me know asap so that I can further investigate this tool.

    Thanks in advance for your help.
    Ruud
  2. Ricky
    Admin
    Ricky avatar
    467 posts

    Posted 04 May 2011 Link to this post

    Hello Ruud,

    Thanks again for sending the issue. In order to reproduce the problem will it be possible to send us the class or reference of the framework member that you are trying to mock which is actually throwing the exception.

    Kind Regards,
    Ricky
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Ruud
    Ruud avatar
    2 posts
    Member since:
    May 2011

    Posted 04 May 2011 Link to this post

    Hello Ricky,

    Thanks for your quick reply!
    I found the problem was running JustMock and TypeMock next to each other for my evaluation. Both applications conflict with each other if they are both running in elevation mode.
    Turning off TypeMock was the solution.

    Ruud
  5. Ricky
    Admin
    Ricky avatar
    467 posts

    Posted 05 May 2011 Link to this post

    Hi Ruud,
    It's great that you found the solution. Also, since Typemock and JustMock both uses profiler. Therefore, due to the overriding nature of .net profiler the first one should be turned off anyway to make JustMock elevated mode work.

    Kind Regards,
    Ricky
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top