Hi Rolf,

> Hi I am using Testify to inject a fake repository into my testng test 
but I
> come op to a problem.
> 
> when i first access the fake repository it gets injected however the 
second
> time i access the repository I get a null pointer exception.
> 
> Now comes another strange thing when i debug everything works fine and 
the
> repository gets injected perfectly.

At the moment Testify's TestNG integration is using @BeforeClass to 
process the @Inject annotations. So I can see that there might be possible 
scenarios that match yours: something where the '@Inject'ed field is 
cleared between tests for example... but it's hard to know exactly what's 
happening from your description.

Could you give some more information (e.g. code examples) that show the 
problem? Also, when you debug, are you running exactly the same suite as 
when you aren't debugging? And is the behaviour consistent if you try this 
multiple times?

Thanks,

Paul






---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.

Reply via email to