Hello Asif, You'll find some exemple to mock a class in the documentation : http://www.ayende.com/wiki/Rhino+Mocks+Mocking+classes.ashx
The feature thaht Tim is speaking is treated as well : http://www.ayende.com/wiki/Rhino+Mocks+Partial+Mocks.ashx If you'd like some ready-to-compile exemples, some of them are available in the project repository : http://github.com/ayende/rhino-mocks/tree/master/Rhino.Mocks.GettingStarted/Documentation/ Regards, Fabien On Jan 20, 4:40 pm, Asifur Khan <[email protected]> wrote: > Dear Tim, > > Can you show me a short example on it ? > > Asif > > On Wed, Jan 20, 2010 at 9:23 AM, Tim Barcz <[email protected]> wrote: > > You don't necessarily need an interface. Rhino allows you to mock classes > > (given that they're public (or otherwise visible to your testing assembly)) > > and that methods contained within are virtual. > > > Rhino also allows you to test abstract base classes by implementing what is > > called a PartialMock. > > > Let me know if you need further assistance. > > > Tim > > > On Sun, Jan 17, 2010 at 10:01 PM, Asif <[email protected]> wrote: > > >> Hi, > >> This is Asif. I am in the beginning level of Unit testing.I just start > >> studying on unit testing. Everywhere I saw examples on Mocking with > >> Interface. But. ifI am not using any interface in my application. How > >> to perform unit testing on that class without using interface. May be > >> my asking question is very funny, but I want to have a clear idea on > >> it. Or if I have to communicate with a abstract class. how to perform > >> unit testing on abstract class ? I am confused in this case. > > >> Thank you > >> Asif > > >> -- > >> 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]<rhinomocks%[email protected]> > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/rhinomocks?hl=en. > > > -- > > Tim Barcz > > Microsoft C# MVP > > Microsoft ASPInsider > >http://timbarcz.devlicio.us > >http://www.twitter.com/timbarcz > > > -- > > 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]<rhinomocks%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/rhinomocks?hl=en. -- 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.
