--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
The injection is performed by Guice, so just after instantiation.I think what you are trying to do is not really injection and probably better addressed with a data provider.
--Cédric
On Mon, May 7, 2018 at 3:32 PM, Vinoth Selvaraj <vino...@gmail.com> wrote:
I use TestNG and Guice and love it so far!I would like to know at which phase it actually injects. Is it before the @BeforeClass? I would like to inject instances depends on certain conditions/parameters of my test.@Injectprivate Car car;My test parameter from suite xml will have different parameters like Audi,BMW,Honda.So, it depends on the value i would like to inject the specific instance.Car car = new Audi();Car car = new BMW();In my guiceModule, I would like to access ITestContext instance somehow so that I could inject specific instance of Car implementation in my test.Is there any clean way to do this?
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.