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

Mocking Non-Public Members

2 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 02 Jul 2010, 08:43 PM
Is it possible to mock non-public members using JustMock?

public class Foo
{
     private int Bar() { get; set; } // Can this be mocked?
}

2 Answers, 1 is accepted

Sort by
0
Ricky
Telerik team
answered on 05 Jul 2010, 01:47 PM
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
0
Nick
Top achievements
Rank 1
answered on 05 Jul 2010, 07:28 PM
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.
Tags
General Discussions
Asked by
Nick
Top achievements
Rank 1
Answers by
Ricky
Telerik team
Nick
Top achievements
Rank 1
Share this question
or