I am using Rhinomocks framework for unit testing. I have difficulty
mocking private members due to its protection level.
How to stub or mock private member?
How to stub or mock readonly properties?
Below is the class with readonly property and private member
public class DAL
{
public int TotalStudents
{
get
{
//Call database
return totalStudents;
}
}
private int NumberOfChoclatesToEachStudent;
public int calculateTotalChoclates()
{
return TotalStudents*NumberOfChoclatesToEachStudent;
}
}
Thank You
--
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rhinomocks?hl=en.