In case anyone else searches the list for tenstng solutions, I found
this approach to work great.
http://asemantics.dyndns.org/m2doc/com.asemantics/testnguice/1.0/inject.html
 (I'm using this now instead of mycila.)

Just make sure your factory class is listed first and it runs great
(the document above has a typo in the class name or the name has since
changed since that was written... the class is AbstractObjectFactory
not AbstractTestObjectFactory.)


On Thu, Jan 15, 2009 at 5:59 PM, Rick <[email protected]> wrote:
> I'm asking here for lack of a better list and for any other recommendations.
>
> I'm trying to use mycilia for testing and according to  the testng
> example here http://code.mycila.com/wiki/MycilaTesting I should be
> able to just extend AbstractMycilaTestNGTest and annotate with my
> GuiceContext However that abstract class doesn't seem to help me,
> instead I have to use the other approarch shown in each of my test
> classes:
>
> @BeforeClass
>    public void setup() {
>        TestSetup.setup(this);
>    }
>
>
> I was hoping I could just have all my classes extend a BaseTest class
> which extends AbstractMycilaTestNGTest and everything would be fine,
> but it's not working for me (None of my Injections take place nor do I
> see my Module even loaded.)
>
> I was hoping to just extends my tests from:
>
> @GuiceContext(OndpServicesTestModule.class)
> public abstract class BaseTest extends AbstractMycilaTestNGTest {
>
> }
>
>
> (As a side note even when I push up the @BeforeClass implementation
> into this base class, things aren't working. It seems odd that I have
> to actually use the @BeforeClass setUp method in my actual concrete
> Test classes and not in the BaseTest class?)
>
> I'm hopefully missing something very simple, but I'm stumped right now.
>



-- 
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