Fantastic! Henning, I've had on my plate for a while to implement a torque based implementation of the security service in fulcrum. this should help that effort!
Eric > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 29, 2004 5:09 PM > To: [EMAIL PROTECTED] > Subject: cvs commit: jakarta-turbine-2/src/test/org/apache/turbine/test > BaseTurbineTest.java HsqlDB.java > > > henning 2004/07/29 08:08:57 > > Modified: . Tag: TURBINE_2_3_BRANCH project.xml > conf/test Tag: TURBINE_2_3_BRANCH TorqueTest.properties > Added: conf/test Tag: TURBINE_2_3_BRANCH > TurbineResources.properties create-db.sql > src/test/org/apache/turbine Tag: TURBINE_2_3_BRANCH > TestTurbine.java > src/test/org/apache/turbine/services/security Tag: > TURBINE_2_3_BRANCH TestSecurity.java > TestSecurityACL.java TestSecurityGroup.java > TestSecurityPermission.java TestSecurityRole.java > TestSecurityUser.java TestSecurityUserManager.java > src/test/org/apache/turbine/services/security/torque Tag: > TURBINE_2_3_BRANCH TestTorqueSecurity.java > src/test/org/apache/turbine/test Tag: TURBINE_2_3_BRANCH > BaseTurbineTest.java HsqlDB.java > Log: > Add quite a number of Unit tests for the Security Service. They were > not initially for the Security Service (at least not the > _Torque_SecurityService) but as I had them anyway, we might as well > put them into the Source tree and push the coverage of > org.apache.torque.security up a bit. > > Feel free to use BaseTurbineTest as a platform from which other Tests > that need an initialized Turbine can be built. > > I use HSQL for testing the database access. This code has been > shamelessly stolen^Wborrowed from the HibernateAvalon component by > Eric Pugh. Thanks! > > Revision Changes Path > No revision > No revision > 1.136.2.4 +18 -0 jakarta-turbine-2/project.xml > > Index: project.xml > =================================================================== > RCS file: /home/cvs/jakarta-turbine-2/project.xml,v > retrieving revision 1.136.2.3 > retrieving revision 1.136.2.4 > diff -u -r1.136.2.3 -r1.136.2.4 > --- project.xml 30 Mar 2004 15:20:21 -0000 1.136.2.3 > +++ project.xml 29 Jul 2004 15:08:56 -0000 1.136.2.4 > @@ -507,6 +507,18 @@ > <version>1.2-b1</version> > <url>http://xml.apache.org/xmlrpc/</url> > </dependency> > + > + <!-- Needed only for testing --> > + <dependency> > + <id>commons-dbcp</id> > + <version>1.1</version> > + </dependency> > + > + <dependency> > + <id>hsqldb</id> > + <version>1.7.1</version> > + </dependency> > + > </dependencies> > > <build> > @@ -516,6 +528,12 @@ > <includes> > <include>**/*Test.java</include> > </includes> > + <includes> > + <include>**/Test*.java</include> > + </includes> > + <excludes> > + <exclude>**/test/*.java</exclude> > + </excludes> > </unitTest> > <integrationUnitTestSourceDirectory/> > <integrationUnitTest/> > > > > No revision > No revision > 1.1.2.1 +36 -4 jakarta-turbine-2/conf/test/TorqueTest.properties > > Index: TorqueTest.properties > =================================================================== > RCS file: /home/cvs/jakarta-turbine-2/conf/test/TorqueTest.properties,v > retrieving revision 1.1 > retrieving revision 1.1.2.1 > diff -u -r1.1 -r1.1.2.1 > --- TorqueTest.properties 22 Jun 2003 22:41:36 -0000 1.1 > +++ TorqueTest.properties 29 Jul 2004 15:08:56 -0000 1.1.2.1 > @@ -6,13 +6,45 @@ > # > # > ------------------------------------------------------------------------ > > +# > +# Copyright 2001-2004 The Apache Software Foundation. > +# > +# Licensed under the Apache License, Version 2.0 (the "License"); > +# you may not use this file except in compliance with the License. > +# You may obtain a copy of the License at > +# > +# http://www.apache.org/licenses/LICENSE-2.0 > +# > +# Unless required by applicable law or agreed to in writing, software > +# distributed under the License is distributed on an "AS IS" BASIS, > +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express > or implied. > +# See the License for the specific language governing permissions and > +# limitations under the License. > +# > + > torque.applicationRoot = . > > -torque.defaults.pool.defaultMaxActive=30 > -torque.defaults.pool.testOnBorrow=true > -torque.defaults.pool.validationQuery=SELECT 1 > +#torque.defaults.pool.defaultMaxActive=30 > +#torque.defaults.pool.testOnBorrow=true > +#torque.defaults.pool.validationQuery=SELECT 1 > + > +torque.defaults.connection.user = sa > +torque.defaults.connection.password = > > torque.idbroker.cleverquantity=true > torque.idbroker.prefetch=true > torque.idbroker.usenewconnection=true > + > +torque.database.default.adapter = hypersonic > + > +torque.dsfactory.default.factory = > org.apache.torque.dsfactory.TorqueDataSourceFactory > +torque.dsfactory.default.pool.defaultMaxConnections = 10 > +torque.dsfactory.default.pool.maxExpiryTime = 3600 > +torque.dsfactory.default.pool.connectionWaitTimeout = 10 > +torque.dsfactory.default.connection.driver = > org.hsqldb.jdbcDriver > +torque.dsfactory.default.connection.url = jdbc:hsqldb:. > + > + > +#torque.dsfactory.default.factory= > org.apache.torque.dsfactory.SharedPoolDataSourceFactory > + > > > > > No revision > > Index: TorqueTest.properties > =================================================================== > RCS file: /home/cvs/jakarta-turbine-2/conf/test/TorqueTest.properties,v > retrieving revision 1.1 > retrieving revision 1.1.2.1 > diff -u -r1.1 -r1.1.2.1 > --- TorqueTest.properties 22 Jun 2003 22:41:36 -0000 1.1 > +++ TorqueTest.properties 29 Jul 2004 15:08:56 -0000 1.1.2.1 > @@ -6,13 +6,45 @@ > # > # > ------------------------------------------------------------------------ > > +# > +# Copyright 2001-2004 The Apache Software Foundation. > +# > +# Licensed under the Apache License, Version 2.0 (the "License"); > +# you may not use this file except in compliance with the License. > +# You may obtain a copy of the License at > +# > +# http://www.apache.org/licenses/LICENSE-2.0 > +# > +# Unless required by applicable law or agreed to in writing, software > +# distributed under the License is distributed on an "AS IS" BASIS, > +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express > or implied. > +# See the License for the specific language governing permissions and > +# limitations under the License. > +# > + > torque.applicationRoot = . > > -torque.defaults.pool.defaultMaxActive=30 > -torque.defaults.pool.testOnBorrow=true > -torque.defaults.pool.validationQuery=SELECT 1 > +#torque.defaults.pool.defaultMaxActive=30 > +#torque.defaults.pool.testOnBorrow=true > +#torque.defaults.pool.validationQuery=SELECT 1 > + > +torque.defaults.connection.user = sa > +torque.defaults.connection.password = > > torque.idbroker.cleverquantity=true > torque.idbroker.prefetch=true > torque.idbroker.usenewconnection=true > + > +torque.database.default.adapter = hypersonic > + > +torque.dsfactory.default.factory = > org.apache.torque.dsfactory.TorqueDataSourceFactory > +torque.dsfactory.default.pool.defaultMaxConnections = 10 > +torque.dsfactory.default.pool.maxExpiryTime = 3600 > +torque.dsfactory.default.pool.connectionWaitTimeout = 10 > +torque.dsfactory.default.connection.driver = > org.hsqldb.jdbcDriver > +torque.dsfactory.default.connection.url = jdbc:hsqldb:. > + > + > +#torque.dsfactory.default.factory= > org.apache.torque.dsfactory.SharedPoolDataSourceFactory > + > > > > > No revision > > Index: TorqueTest.properties > =================================================================== > RCS file: /home/cvs/jakarta-turbine-2/conf/test/TorqueTest.properties,v > retrieving revision 1.1 > retrieving revision 1.1.2.1 > diff -u -r1.1 -r1.1.2.1 > --- TorqueTest.properties 22 Jun 2003 22:41:36 -0000 1.1 > +++ TorqueTest.properties 29 Jul 2004 15:08:56 -0000 1.1.2.1 > @@ -6,13 +6,45 @@ > # > # > ------------------------------------------------------------------------ > > +# > +# Copyright 2001-2004 The Apache Software Foundation. > +# > +# Licensed under the Apache License, Version 2.0 (the "License"); > +# you may not use this file except in compliance with the License. > +# You may obtain a copy of the License at > +# > +# http://www.apache.org/licenses/LICENSE-2.0 > +# > +# Unless required by applicable law or agreed to in writing, software > +# distributed under the License is distributed on an "AS IS" BASIS, > +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express > or implied. > +# See the License for the specific language governing permissions and > +# limitations under the License. > +# > + > torque.applicationRoot = . > > -torque.defaults.pool.defaultMaxActive=30 > -torque.defaults.pool.testOnBorrow=true > -torque.defaults.pool.validationQuery=SELECT 1 > +#torque.defaults.pool.defaultMaxActive=30 > +#torque.defaults.pool.testOnBorrow=true > +#torque.defaults.pool.validationQuery=SELECT 1 > + > +torque.defaults.connection.user = sa > +torque.defaults.connection.password = > > torque.idbroker.cleverquantity=true > torque.idbroker.prefetch=true > torque.idbroker.usenewconnection=true > + > +torque.database.default.adapter = hypersonic > + > +torque.dsfactory.default.factory = > org.apache.torque.dsfactory.TorqueDataSourceFactory > +torque.dsfactory.default.pool.defaultMaxConnections = 10 > +torque.dsfactory.default.pool.maxExpiryTime = 3600 > +torque.dsfactory.default.pool.connectionWaitTimeout = 10 > +torque.dsfactory.default.connection.driver = > org.hsqldb.jdbcDriver > +torque.dsfactory.default.connection.url = jdbc:hsqldb:. > + > + > +#torque.dsfactory.default.factory= > org.apache.torque.dsfactory.SharedPoolDataSourceFactory > + > > > > > 1.1.2.1 +702 -0 > jakarta-turbine-2/conf/test/Attic/TurbineResources.properties > > > > > 1.1.2.1 +130 -0 jakarta-turbine-2/conf/test/Attic/create-db.sql > > > > > No revision > No revision > 1.1.2.1 +48 -0 > jakarta-turbine-2/src/test/org/apache/turbine/Attic/TestTurbine.java > > > > > No revision > No revision > 1.1.2.1 +277 -0 > jakarta-turbine-2/src/test/org/apache/turbine/services/security/At > tic/TestSecurity.java > > > > > 1.1.2.1 +124 -0 > jakarta-turbine-2/src/test/org/apache/turbine/services/security/At > tic/TestSecurityACL.java > > > > > 1.1.2.1 +212 -0 > jakarta-turbine-2/src/test/org/apache/turbine/services/security/At > tic/TestSecurityGroup.java > > > > > 1.1.2.1 +350 -0 > jakarta-turbine-2/src/test/org/apache/turbine/services/security/At > tic/TestSecurityPermission.java > > > > > 1.1.2.1 +400 -0 > jakarta-turbine-2/src/test/org/apache/turbine/services/security/At > tic/TestSecurityRole.java > > > > > 1.1.2.1 +190 -0 > jakarta-turbine-2/src/test/org/apache/turbine/services/security/At > tic/TestSecurityUser.java > > > > > 1.1.2.1 +317 -0 > jakarta-turbine-2/src/test/org/apache/turbine/services/security/At > tic/TestSecurityUserManager.java > > > > > No revision > No revision > 1.1.2.1 +57 -0 > jakarta-turbine-2/src/test/org/apache/turbine/services/security/to > rque/Attic/TestTorqueSecurity.java > > > > > No revision > No revision > 1.1.2.1 +90 -0 > jakarta-turbine-2/src/test/org/apache/turbine/test/Attic/BaseTurbi > neTest.java > > > > > 1.1.2.1 +116 -0 > jakarta-turbine-2/src/test/org/apache/turbine/test/Attic/HsqlDB.java > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
