When the project is small, i use to do this also to make my tests
smaller. But when the project grows, you end up by needing more stuff
in @BeforeClass that is quite specific to a test. So i find it easier
to maintain a test with less coupling since it is quite well isolated.

So like all, it depends on your needs, your project size, ... Take the
right approach, the simplest and the least coupling being often the
better ones ;)


On Jan 16, 10:05 am, Rick <[email protected]> wrote:
> On Fri, Jan 16, 2009 at 2:04 AM, Dhanji R. Prasanna <[email protected]> wrote:
>
>
>
> >>> If you need some help, i suggest you post fore information on your
> >>> setup and the libraries you are using on your classpath at
> >>>http://code.google.com/p/mycila/issues/listso that we can help you.
> >>> Nevertheless, i hardly advise to not use inheritance even for test
> >>> classes since it leads to junk classes having an accumulation of
> >>> methods which leads to tests that are time consuming to maintain.
>
> > Or did you mean, you "strongly" advise against inheritance? In which case, I
> > agree.
>
> Yea you're both on the same page there.
>
> Just curious though how would you recommend setting up a common
> @BeforeMethod @AterMethod type of behavior? Is it at least ok to push
> that into a class my tests classes can extend so they all have those
> method implementations inherited?
>
> Thanks
> --
> Rick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" 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/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to