Author: glandais Date: 2008-03-18 13:29:08 +0000 (Tue, 18 Mar 2008) New Revision: 1394 Modified: trunk/simexplorer-is/simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service/SecurityTestCase.java Log: Test query Modified: trunk/simexplorer-is/simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service/SecurityTestCase.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service/SecurityTestCase.java 2008-03-18 13:23:11 UTC (rev 1393) +++ trunk/simexplorer-is/simexplorer-is-service/src/test/fr/cemagref/simexplorer/is/service/SecurityTestCase.java 2008-03-18 13:29:08 UTC (rev 1394) @@ -43,21 +43,26 @@ super.setUp(); Properties properties = (Properties) System.getProperties().clone(); properties.put("java.naming.provider.url", "jnp://localhost:1099"); - properties.put("java.naming.factory.initial", - "org.jnp.interfaces.NamingContextFactory"); + properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); properties.put("java.naming.factory.url.pkgs", "org.jnp.interfaces"); Context context = new InitialContext(properties); - authenticationService = (AuthenticationService) context - .lookup("AuthenticationService"); + authenticationService = (AuthenticationService) context.lookup("AuthenticationService"); } +/* + public void testQuery() throws SimExplorerException { + //String query = "select distinct group from Actor actor join actor.groups as group where actor = :actor and group.visible = true"; + String query = "select distinct g from Group g, Actor actor where g member of actor.groups and g.visible = true"; + System.out.println(authenticationService.debugQuery(query, 1)); + } +*/ + /** * Test security entities. * - * @throws SimExplorerException - * the sim explorer service exception + * @throws SimExplorerException the sim explorer service exception */ public void testSecurityEntities() throws SimExplorerException { /* @@ -67,6 +72,8 @@ System.out.println(group.getName()); } */ + + /* String token = authenticationService .loginUser("superadmin", "password"); @@ -106,6 +113,7 @@ authenticationService.updateUser(token, simpleUsers[j]); } } + */ /* User superAdminUser = authenticationService.saveUser(token,