From: <fg...@us...> - 2008-03-02 23:28:12
|
Revision: 711 http://openutils.svn.sourceforge.net/openutils/?rev=711&view=rev Author: fgiust Date: 2008-03-02 15:28:17 -0800 (Sun, 02 Mar 2008) Log Message: ----------- fix excludedTables in DbUnitExecution Modified Paths: -------------- trunk/openutils-testing/pom.xml trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java trunk/openutils-testing/src/site/changes/changes.xml Added Paths: ----------- trunk/openutils-testing/src/test/ trunk/openutils-testing/src/test/java/ trunk/openutils-testing/src/test/java/it/ trunk/openutils-testing/src/test/java/it/openutils/ trunk/openutils-testing/src/test/java/it/openutils/testing/ trunk/openutils-testing/src/test/java/it/openutils/testing/RegExpTableFilterTest.java Property Changed: ---------------- trunk/openutils-testing/ Property changes on: trunk/openutils-testing ___________________________________________________________________ Name: svn:ignore - .project .classpath .checkstyle target .settings + .project .classpath .checkstyle target .settings test-output temp-testng-customsuite.xml Modified: trunk/openutils-testing/pom.xml =================================================================== --- trunk/openutils-testing/pom.xml 2008-02-29 16:53:04 UTC (rev 710) +++ trunk/openutils-testing/pom.xml 2008-03-02 23:28:17 UTC (rev 711) @@ -1,4 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -57,6 +58,19 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.7</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> </dependencies> <properties> <spring.version>2.5.1</spring.version> Modified: trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java =================================================================== --- trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java 2008-02-29 16:53:04 UTC (rev 710) +++ trunk/openutils-testing/src/main/java/it/openutils/testing/DbUnitExecution.java 2008-03-02 23:28:17 UTC (rev 711) @@ -22,7 +22,6 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.dbunit.database.DatabaseConfig; import org.dbunit.dataset.datatype.IDataTypeFactory; import org.dbunit.operation.DatabaseOperation; @@ -62,9 +61,9 @@ /** * A regexp that can match table names. Any table matching this regular expression will not be considered by DbUnit. - * By default tables starting with $ are ignored (oracle recycle bin). + * By default tables starting with BIN$ are ignored (oracle recycle bin). */ - String excludedTables() default "(^\\$(.*))"; // oracle recycle bin + String excludedTables() default "^BIN\\$(.*)"; // oracle recycle bin /** * If true, <strong>all</strong> the tables in the database will be truncated before loading any dataset. Modified: trunk/openutils-testing/src/site/changes/changes.xml =================================================================== --- trunk/openutils-testing/src/site/changes/changes.xml 2008-02-29 16:53:04 UTC (rev 710) +++ trunk/openutils-testing/src/site/changes/changes.xml 2008-03-02 23:28:17 UTC (rev 711) @@ -8,30 +8,30 @@ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> </properties> <body> + <release version="2.0.3" date="in svn" description="2.0.3"> + <action type="fix" dev="fgiust"> excludedTables in DbUnitExecution now defaults to "^BIN\\$(.*)", properly excluding + tables in oracle recycle bin.</action> + </release> <release version="2.0.3" date="2008-02-19" description="2.0.3"> - <action type="update" dev="fgiust"> - it.openutils.testing.DateAssert is now thread safe. Failure messages have been improved. - </action> - <action type="add" dev="fcarone"> - New option for DbUnitExection to specify the DatabaseConfig.PROPERTY_DATATYPE_FACTORY added. - </action> + <action type="update" dev="fgiust"> it.openutils.testing.DateAssert is now thread safe. Failure messages have been + improved.</action> + <action type="add" dev="fcarone"> New option for DbUnitExection to specify the + DatabaseConfig.PROPERTY_DATATYPE_FACTORY added.</action> </release> <release version="2.0.2" date="2008-01-31" description="2.0.2"> - <action type="add" dev="fgiust"> - New dbunit operation classes for mssql and mysql (extension of standard dbunit operation, but refactored so that - they can be used in annotations). See the javadocs in the it.openutils.testing.dbunit package - </action> - <action type="update" dev="fgiust"> - truncate operation now defaults to DbUnitOperation.DELETE_ALL instead of DbUnitOperation.TRUNCATE. - </action> - <action type="fix" dev="fgiust">DbUnitUtils.exportDataset() doesn't close anymore the provided connection</action> + <action type="add" dev="fgiust"> New dbunit operation classes for mssql and mysql (extension of standard dbunit + operation, but refactored so that they can be used in annotations). See the javadocs in the + it.openutils.testing.dbunit package</action> + <action type="update" dev="fgiust"> truncate operation now defaults to DbUnitOperation.DELETE_ALL instead of + DbUnitOperation.TRUNCATE.</action> + <action type="fix" dev="fgiust">DbUnitUtils.exportDataset() doesn't close anymore the + provided connection</action> <action type="add" dev="fgiust">new DbUnitUtils.exportTablesToDir() utility method</action> </release> <release version="2.0.1" date="2008-01-30" description="2.0.1"> - <action type="fix" dev="fgiust"> - (junit version only). it.openutils.testing.junit.AbstractDbUnitJunitSpringContextTests was totally broken due to - the setup method being protected. Fixed + added tests - </action> + <action type="fix" dev="fgiust"> (junit version only). + it.openutils.testing.junit.AbstractDbUnitJunitSpringContextTests was totally broken due to the setup method + being protected. Fixed + added tests</action> </release> <release version="2.0" date="2008-01-20" description="2.0 release"> <action type="update" dev="fgiust">Totally reworked dbunit test framework.</action> Added: trunk/openutils-testing/src/test/java/it/openutils/testing/RegExpTableFilterTest.java =================================================================== --- trunk/openutils-testing/src/test/java/it/openutils/testing/RegExpTableFilterTest.java (rev 0) +++ trunk/openutils-testing/src/test/java/it/openutils/testing/RegExpTableFilterTest.java 2008-03-02 23:28:17 UTC (rev 711) @@ -0,0 +1,26 @@ +package it.openutils.testing; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author fgiust + * @version $Id: $ + */ +@DbUnitExecution +public class RegExpTableFilterTest +{ + + @Test + public void testDefaultRegExp() throws Exception + { + + DbUnitExecution dbUnitExecution = getClass().getAnnotation(DbUnitExecution.class); + RegExpTableFilter retf = new RegExpTableFilter(dbUnitExecution.excludedTables()); + + Assert.assertTrue(retf.accept("SOMETHING")); + Assert.assertFalse(retf.accept("BIN$SOMETHING")); + + } +} Property changes on: trunk/openutils-testing/src/test/java/it/openutils/testing/RegExpTableFilterTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |