Mocking Non-Public Members

3 posts, 0 answers
  1. Nick
    Nick avatar
    4 posts
    Member since:
    Jul 2010

    Posted 02 Jul 2010 Link to this post

    Is it possible to mock non-public members using JustMock?

    public class Foo
    {
         private int Bar() { get; set; } // Can this be mocked?
    }
  2. Ricky
    Admin
    Ricky avatar
    467 posts

    Posted 05 Jul 2010 Link to this post

    Hello Nick,

    Thanks a lot for asking the question. Currenlty, it is not possible to mock private / internal methods. But the good news is that we have added non-public support  and it is due in the coming build.

    Hope that helps,
    Mehfuz



    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. Nick
    Nick avatar
    4 posts
    Member since:
    Jul 2010

    Posted 05 Jul 2010 Link to this post

    That's great news! It's going to be nice having an alternative to TypeMock - which is way too expensive.

    Keep up the good work.
Back to Top