New to JustMock but can't get a simple example working

2 posts, 0 answers
  1. Richard
    Richard avatar
    26 posts
    Member since:
    Oct 2008

    Posted 21 Sep 2011 Link to this post

    I am trying to get a very basic test working that looks like this and keep getting a failure.

    public void FooSubmitTest()
        Mock.Assert(() => Foo.Submit());

    Submit method:
    public class Foo
        public static void Submit()
            throw new NotImplementedException();

    The test fails on this line:
    throw new NotImplementedException();

    Can you tell me why this does not pass?

  2. Ricky
    Ricky avatar
    467 posts

    Posted 27 Sep 2011 Link to this post

    Hi Richard,

    Thanks for sending the issue. However from your profile i can see that you are using JustMock free edition. Since mocking static method should be doing via profiler, therefore you should have JustMock Full / Trial installed and "Enable JustMock" in JM addin inside visual studio should be grayed out.

    While I run your test with the latest release it seems to work as expected. You can also check if your profiler is up and running through this following line:


    Hope that answers your question.

    Kind Regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
Back to Top