Am not saying Kenneth's way is wrong...but...

Mocking isn't always the answer.  In the case of testing the abstract class,
it's probably easier/quicker to simply create a "Test Specific Sub-Class"
(xUnit Test pattern - see
http://xunitpatterns.com/Test-Specific%20Subclass.html).

Mocking solves a particluar problem but be wary to avoid the "I'm a hammer
so everything looks like a nail" syndrome....

Tim

On Fri, Sep 11, 2009 at 11:03 AM, Kenneth Xu <[email protected]> wrote:

>
> I know people will argue but I do use PartialMock to test abstract
> class. Only when the are cases that I need more control then I create
> the fake.
>
> GeneratePartialMock<T>(constructor arguments...)
>
> On Fri, Sep 11, 2009 at 9:22 AM, TJA <[email protected]> wrote:
> > Translation is abstract that's why I thought I could mock "behavior"
> > before I understood.
> >
> > I need to create a class that inheritates Translation to achieve it.
>
> >
>


-- 
Tim Barcz
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]
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to