On Jan 8, 2009, at 10:35 AM, Fabio Mancinelli wrote: > Vincent Massol wrote: >> On Jan 8, 2009, at 12:44 AM, Fabio Mancinelli wrote: >> >>> Dear all, >>> >>> I've finished to refactor the rest subsystem and I propose to move >>> it to >>> the trunk for inclusion in 1.8M1. >>> >>> It doesn't support all the URIs of the API (see >>> http://dev.xwiki.org/xwiki/bin/view/Design/RestfulAPI for details) >>> but >>> still I think it's good to have it included. >> >> Do we have tests for it? >> > > Yes. > http://svn.xwiki.org/svnroot/xwiki/sandbox/xwiki-core-rest/src/test/java/org/xwiki/rest/
These are unit tests right? I think we'll need a few integration ones too to ensure the whole thing works. These selenium tests can be put in the enterprise/ project under distribution-tests/selenium-tests IMO. > Actually there is a small thing that needs to be modified in those > tests. They are working but they use target URIs from constants in the > code while they should retrieve those URIs from the components in > components.xml (because they are configurable and variables). > > So I need to setup a component manager in order to retrieve them. > I tried to do something like: > > ComponentManager componentManager = new PlexusComponentManager(new > DefaultPlexusContainer); > componentManager.lookup(SpacesResource.class.getName()) > > But the lookup fails. > Maybe I am missing something. You need to use the shared tests in tools for testing components. -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

