The Testify documentation seems to imply that if its jar is present on your class path, you can use @Inject within your tests just like you would in a page class and get services from your IOC registry. (http://tapestry.formos.com/nightly/tapestry-testify/#Inject_services_into_tests ).

However it doesn't seem to be working the way I expect. Is there some other setup that needs to take place?


public class SimpleTest2 extends AbstractIntegrationTestSuite

{
        @Inject
        IDataSource datasource;

        @Test
        public void dataSourceTest() throws Exception {
                assertNotNull(datasource); // This fails in the test.
        }

}

datasource is null in this case, but I know it is in the registry correctly because I can use datasource injected like this within a page class.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to