Re: Testify + TestNG: more than one object marked as @ForComponents

2009-11-13 Thread Paul Field
You need to be very careful about calling tester.injectInto() yourself because the superclass TapestryTest is already doing that for you. It contains this code: @BeforeClass(alwaysRun=true) public final void processInjectAnnotation() { tester.injectInto(this); } So I would t

Re: Testify + TestNG: more than one object marked as @ForComponents

2009-11-13 Thread Ben Gidley
Augusto, I just fixed this by making the 'TapestryTester' not static. THis removes the issue. However this does seem to defeat some of the point of testify as we now have a lot slower tests are we will be initialising the tester for each test. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On F

Re: Testify + Testng

2009-07-15 Thread Juan E. Maya
Great Christian ! I was about to post an issue with this. It's working perfectly now! Thanks a lot On Wed, Jul 15, 2009 at 7:25 AM, Paul Field wrote: >> > I have been playing with Testng and the Testify library but i am >> > having a small issue. It seems that the injection of services occurs >>

Re: Testify + Testng

2009-07-15 Thread Christian Edward Gruber
It can be useful if it's injecting stateful services. If it injects them BeforeClass, then you can have state from one test affecting others. Not all services are singleton-scoped. Christian. On 2009-07-15, at 01:32 , Paul Field wrote: Hi Christian, It might make sense to have a "hit"

Re: Testify + Testng

2009-07-14 Thread Paul Field
Hi Christian, > It might make sense to have a "hit" annotation for Testify that > follows @Inject which allows the injection to be beforeMethod or > beforeClass. Unfortunately, we can't re-use the jUnit ones because > (if I recall correctly) they are not suitable for Field annotation, > just

Re: Testify + Testng

2009-07-14 Thread Paul Field
> > I have been playing with Testng and the Testify library but i am > > having a small issue. It seems that the injection of services occurs > > after the @BeforeSuite. > > > However, it does seem reasonable to process the @Inject annotations at the > start of the TestNG suite, so the latest Te

Re: Testify + Testng

2009-07-13 Thread Christian Gruber
It might make sense to have a "hit" annotation for Testify that follows @Inject which allows the injection to be beforeMethod or beforeClass. Unfortunately, we can't re-use the jUnit ones because (if I recall correctly) they are not suitable for Field annotation, just method. But somethin

Re: Testify + Testng

2009-07-13 Thread Paul Field
Hi Juan, > I have been playing with Testng and the Testify library but i am > having a small issue. It seems that the injection of services occurs > after the @BeforeSuite. That's true - Testify was processing @Inject annotations before every test method, mainly because that's the natural way fo