Thanks Stuart, changing to 5.11 TestNG did a trick and there is no test failure anymore. Now i'm investigating test classpath order.
On Sep 27, 12:38 pm, Stuart McCulloch <[email protected]> wrote: > On 26 September 2010 22:12, Sam Berlin <[email protected]> wrote: > > > I can't reproduce this problem against SVN head. Are you certain that the > > runtime classpath is using the proper Guice jar and not an earlier version? > > Guice 2.0 didn't support JSR330, so if the runtime classpath is somehow > > using guice-2.0, the test would fail. > > TestNG has a direct dependency on Guice 2.0 since 5.12, so if you're using > Maven to test > your application and you're using a later Guice artifact with different GAV > coordinates then > the Guice 2.0 jar will appear before the other artifact on the test > classpath - hence the non > injection of javax.inject.Inject > > if you put your Guice trunk artifact before TestNG or use TestNG 5.11 then > it should work > > -- > Cheers, Stuart > > sam > > > > > > > On Fri, Sep 24, 2010 at 4:09 AM, RShostak <[email protected]> wrote: > > >> Ok, I made some more testing on this. > > >> 1) Switched from BeforeClass to BeforeMethod annotation though it > >> should probably work with both of them > >> 2) Created a simple eclipse projecthttp://turboupload.com/tpnop9x3jro9 > >> (latest Guice snapshot) > >> 3) tested with Guice 2.0, Guice r1189, Guice HEAD - same result for > >> me. > > >> FAILED: testInsertion > >> java.lang.AssertionError: expected:<true> but was:<false> > >> at org.testng.Assert.fail(Assert.java:89) > >> at org.testng.Assert.failNotEquals(Assert.java:480) > >> at org.testng.Assert.assertTrue(Assert.java:37) > >> at org.testng.Assert.assertNotNull(Assert.java:394) > >> at org.testng.Assert.assertNotNull(Assert.java:384) > >> at TestGuice.testInsertion(TestGuice.java:33) > > >> I will create bug report but just want to make sure that its not the > >> problem on my side (since the test case is rather simple) > > >> -- > >> 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]<google-guice%2bunsubscr...@google > >> groups.com> > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/google-guice?hl=en. > > > -- > > 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]<google-guice%2bunsubscr...@google > > groups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-guice?hl=en. -- 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.
