How to test private methods and properties using FakeItEasy Frame Work
Asked
Active
Viewed 1,039 times
-1
-
1why do you want to test private methods? These should be implementation details and you should test them by testing the behaviour of your class. If you want to provide mock values then it should be by mocking objects passed to your class, not created in private methods – Sam Holder Jun 01 '15 at 08:56
1 Answers
2
FakeItEasy has no knowledge of your production class's private methods and properties, and so cannot be used to test them directly.
As @SamHolder points out, such practice is likely a bad idea, as the private methods are implementation details.

Blair Conrad
- 233,004
- 25
- 132
- 111