You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(7) |
Aug
(37) |
Sep
|
Oct
|
Nov
(1) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(8) |
Feb
(68) |
Mar
(72) |
Apr
(149) |
May
(32) |
Jun
(46) |
Jul
(26) |
Aug
(59) |
Sep
(25) |
Oct
(18) |
Nov
(4) |
Dec
(3) |
2004 |
Jan
(90) |
Feb
(19) |
Mar
(38) |
Apr
(41) |
May
(44) |
Jun
(2) |
Jul
(10) |
Aug
|
Sep
(14) |
Oct
|
Nov
(1) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(15) |
Jun
(1) |
Jul
|
Aug
(9) |
Sep
|
Oct
(17) |
Nov
|
Dec
|
2006 |
Jan
(1) |
Feb
(16) |
Mar
|
Apr
(1) |
May
(48) |
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(29) |
2007 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(23) |
Mar
(31) |
Apr
|
May
(26) |
Jun
(6) |
Jul
(1) |
Aug
|
Sep
(7) |
Oct
(1) |
Nov
(8) |
Dec
(8) |
2009 |
Jan
(5) |
Feb
(9) |
Mar
(1) |
Apr
|
May
(23) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
(9) |
Oct
(28) |
Nov
(18) |
Dec
(8) |
2010 |
Jan
(19) |
Feb
(24) |
Mar
(3) |
Apr
|
May
(5) |
Jun
(4) |
Jul
|
Aug
(1) |
Sep
(11) |
Oct
|
Nov
(2) |
Dec
(1) |
2011 |
Jan
|
Feb
(7) |
Mar
|
Apr
(6) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(32) |
Oct
(6) |
Nov
|
Dec
|
From: <mla...@us...> - 2003-03-11 13:26:06
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset In directory sc8-pr-cvs1:/tmp/cvs-serv27072/dbunit/src/test/org/dbunit/dataset Modified Files: AllTests.java FilteredDataSetTest.java Log Message: Refactoring of FilteredDataSet to allow plugable filtering strategy. Index: AllTests.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/AllTests.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AllTests.java 20 Feb 2003 03:55:17 -0000 1.11 --- AllTests.java 11 Mar 2003 13:26:02 -0000 1.12 *************** *** 38,41 **** --- 38,43 ---- TestSuite suite = new TestSuite(); suite.addTest(org.dbunit.dataset.datatype.AllTests.suite()); + // suite.addTest(org.dbunit.dataset.excel.AllTests.suite()); + suite.addTest(org.dbunit.dataset.filter.AllTests.suite()); suite.addTest(org.dbunit.dataset.xml.AllTests.suite()); suite.addTest(new TestSuite(CaseInsensitiveDataSetTest.class)); Index: FilteredDataSetTest.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/FilteredDataSetTest.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FilteredDataSetTest.java 14 Feb 2003 03:22:00 -0000 1.9 --- FilteredDataSetTest.java 11 Mar 2003 13:26:02 -0000 1.10 *************** *** 145,148 **** --- 145,161 ---- } + public void testGetDuplicateTableNames() throws Exception + { + IDataSet dataSet = createDuplicateDataSet(); + try + { + dataSet.getTableNames(); + fail("Should throw AmbiguousTableNameException"); + } + catch (AmbiguousTableNameException e) + { + } + } + public void testGetDuplicateTables() throws Exception { |
Update of /cvsroot/dbunit/./dbunit/src/java/org/dbunit/dataset/filter In directory sc8-pr-cvs1:/tmp/cvs-serv27072/dbunit/src/java/org/dbunit/dataset/filter Added Files: ExcludeTableFilter.java ITableFilter.java AbstractTableFilter.java SequenceTableFilter.java IncludeTableFilter.java Log Message: Refactoring of FilteredDataSet to allow plugable filtering strategy. --- NEW FILE: ExcludeTableFilter.java --- /* * * The DbUnit Database Testing Framework * Copyright (C)2002, Manuel Laflamme * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package org.dbunit.dataset.filter; import java.util.HashSet; import java.util.Set; /** * This filter hides specified tables from the filtered dataset. This * implementation do not modify the original table sequence from the filtered * dataset and support duplicate table names. * * @author Manuel Laflamme * @since Mar 7, 2003 * @version $Revision: 1.1 $ */ public class ExcludeTableFilter extends AbstractTableFilter implements ITableFilter { private Set _forbidenNames = new HashSet(); /** * Create a new empty ExcludeTableFilter. Use {@link #addTableName} to hide * some tables. */ public ExcludeTableFilter() { } /** * Create a new ExcludeTableFilter which prevent access to specified tables. */ public ExcludeTableFilter(String[] tableNames) { for (int i = 0; i < tableNames.length; i++) { String tableName = tableNames[i]; addTableName(tableName); } } /** * Add a new table name to exclude in this filter. */ public void addTableName(String tableName) { _forbidenNames.add(tableName.toUpperCase()); } //////////////////////////////////////////////////////////////////////////// // ITableFilter interface public boolean isValidName(String tableName) { return !_forbidenNames.contains(tableName.toUpperCase()); } } --- NEW FILE: ITableFilter.java --- /* * * The DbUnit Database Testing Framework * Copyright (C)2002, Manuel Laflamme * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package org.dbunit.dataset.filter; import org.dbunit.dataset.DataSetException; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.ITable; import org.dbunit.dataset.*; /** * Represents a strategy used by {@link FilteredDataSet} to exposes only some * tables from a dataset. * * @author Manuel Laflamme * @since Mar 7, 2003 * @version $Revision: 1.1 $ */ public interface ITableFilter { /** * Returns <code>true</code> if specified table is allowed by this filter. */ public boolean isValidName(String tableName) throws DataSetException; /** * Returns the table names allowed by this filter from the specified dataset. * * @param dataSet the filtered dataset */ public String[] getTableNames(IDataSet dataSet) throws DataSetException; /** * Returns the tables allowed by this filter from the specified dataset. * * @param dataSet the filtered dataset */ public ITable[] getTables(IDataSet dataSet) throws DataSetException; } --- NEW FILE: AbstractTableFilter.java --- /* * * The DbUnit Database Testing Framework * Copyright (C)2002, Manuel Laflamme * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package org.dbunit.dataset.filter; import org.dbunit.dataset.DataSetException; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.ITable; import org.dbunit.dataset.NoSuchTableException; import java.util.List; import java.util.ArrayList; /** * This class provides a skeletal implementation of the {@link ITableFilter} * interface to minimize the effort required to implement a filter. Subsclasses * are only required to implement the {@link ITableFilter#isValidName} method. * * @author Manuel Laflamme * @since Mar 8, 2003 * @version $Revision: 1.1 $ */ public abstract class AbstractTableFilter implements ITableFilter { //////////////////////////////////////////////////////////////////////////// // ITableFilter interface public String[] getTableNames(IDataSet dataSet) throws DataSetException { String[] tableNames = dataSet.getTableNames(); List nameList = new ArrayList(); for (int i = 0; i < tableNames.length; i++) { String tableName = tableNames[i]; if (isValidName(tableName)) { nameList.add(tableName); } } return (String[])nameList.toArray(new String[0]); } public ITable[] getTables(IDataSet dataSet) throws DataSetException { ITable[] tables = dataSet.getTables(); List tableList = new ArrayList(); for (int i = 0; i < tables.length; i++) { ITable table = tables[i]; String tableName = table.getTableMetaData().getTableName(); if (isValidName(tableName)) { tableList.add(table); } } return (ITable[])tableList.toArray(new ITable[0]); } } --- NEW FILE: SequenceTableFilter.java --- /* * * The DbUnit Database Testing Framework * Copyright (C)2002, Manuel Laflamme * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package org.dbunit.dataset.filter; import org.dbunit.database.AmbiguousTableNameException; import org.dbunit.dataset.*; import java.util.ArrayList; import java.util.List; /** * This filter expose a specified table sequence and can be used to reorder * dataset table names. This implementation do not support duplicate table names. * Thus you cannot specify the same table name more than once in this filter * and the filtered dataset must not contains duplicate table names. This is * the default filter used by the {@link FilteredDataSet}. * * @author Manuel Laflamme * @since Mar 7, 2003 * @version $Revision: 1.1 $ */ public class SequenceTableFilter implements ITableFilter { private final String[] _tableNames; /** * Creates a new SequenceTableFilter with specified table names sequence. */ public SequenceTableFilter(String[] tableNames) { _tableNames = tableNames; } private boolean isValidName(String tableName, String[] tableNames, boolean verifyDuplicate) throws AmbiguousTableNameException { boolean found = false; for (int i = 0; i < tableNames.length; i++) { if (tableName.equalsIgnoreCase(tableNames[i])) { if (!verifyDuplicate) { return true; } if (found) { throw new AmbiguousTableNameException(tableName); } found = true; } } return found; } //////////////////////////////////////////////////////////////////////////// // ITableFilter interface public boolean isValidName(String tableName) throws DataSetException { return isValidName(tableName, _tableNames, true); } public String[] getTableNames(IDataSet dataSet) throws DataSetException { List nameList = new ArrayList(); for (int i = 0; i < _tableNames.length; i++) { try { // Use the table name from the filtered dataset. This ensure // that table names are having the same case (lower/upper) from // getTableNames() and getTables() methods. ITableMetaData metaData = dataSet.getTableMetaData(_tableNames[i]); nameList.add(metaData.getTableName()); } catch (NoSuchTableException e) { // Skip this table name because the filtered dataset does not // contains it. } } return (String[])nameList.toArray(new String[0]); } public ITable[] getTables(IDataSet dataSet) throws DataSetException { List tableList = new ArrayList(); String[] tableNames = getTableNames(dataSet); for (int i = 0; i < tableNames.length; i++) { String tableName = tableNames[i]; tableList.add(dataSet.getTable(tableName)); } return (ITable[])tableList.toArray(new ITable[0]); } } --- NEW FILE: IncludeTableFilter.java --- /* * * The DbUnit Database Testing Framework * Copyright (C)2002, Manuel Laflamme * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package org.dbunit.dataset.filter; import java.util.HashSet; import java.util.Set; /** * This filter exposes only allowed tables from the filtered dataset. This * implementation do not modify the original table sequence from the filtered * dataset and support duplicate table names. * * @author Manuel Laflamme * @since Mar 7, 2003 * @version $Revision: 1.1 $ */ public class IncludeTableFilter extends AbstractTableFilter implements ITableFilter { private final Set _allowedNames = new HashSet(); /** * Create a new empty IncludeTableFilter. Use {@link #addTableName} to allow * access to some tables. */ public IncludeTableFilter() { } /** * Create a new IncludeTableFilter which allow access to specified tables. */ public IncludeTableFilter(String[] tableNames) { for (int i = 0; i < tableNames.length; i++) { String tableName = tableNames[i]; addTableName(tableName); } } /** * Add a new table name to include in this filter. */ public void addTableName(String tableName) { _allowedNames.add(tableName.toUpperCase()); } //////////////////////////////////////////////////////////////////////////// // ITableFilter interface public boolean isValidName(String tableName) { return _allowedNames.contains(tableName.toUpperCase()); } } |
From: <mla...@us...> - 2003-03-11 13:26:05
|
Update of /cvsroot/dbunit/./dbunit/src/test/org/dbunit/dataset/filter In directory sc8-pr-cvs1:/tmp/cvs-serv27072/dbunit/src/test/org/dbunit/dataset/filter Added Files: AbstractTableFilterTest.java AllTests.java SequenceTableFilterTest.java Log Message: Refactoring of FilteredDataSet to allow plugable filtering strategy. --- NEW FILE: AbstractTableFilterTest.java --- /* * * The DbUnit Database Testing Framework * Copyright (C)2002, Manuel Laflamme * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package org.dbunit.dataset.filter; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.CompositeDataSet; import org.dbunit.dataset.xml.XmlDataSet; import junit.framework.TestCase; import java.io.FileReader; /** * @author Manuel Laflamme * @since Mar 9, 2003 * @version $Revision: 1.1 $ */ public abstract class AbstractTableFilterTest extends TestCase { private static final String[] TABLE_NAMES = { "TEST_TABLE", "SECOND_TABLE", "EMPTY_TABLE", "PK_TABLE", "ONLY_PK_TABLE", "EMPTY_MULTITYPE_TABLE", }; private static final String[] DUPLICATE_TABLE_NAMES = { "DUPLICATE_TABLE", "EMPTY_TABLE", "DUPLICATE_TABLE", }; public AbstractTableFilterTest(String s) { super(s); } protected String[] getExpectedNames() throws Exception { return (String[])TABLE_NAMES.clone(); } protected String[] getExpectedLowerNames() throws Exception { String[] names = (String[])TABLE_NAMES.clone(); for (int i = 0; i < names.length; i++) { names[i] = names[i].toLowerCase(); } return names; } protected String[] getExpectedDuplicateNames() { return (String[])DUPLICATE_TABLE_NAMES.clone(); } protected IDataSet createDataSet() throws Exception { IDataSet dataSet1 = new XmlDataSet( new FileReader("src/xml/dataSetTest.xml")); IDataSet dataSet2 = new XmlDataSet( new FileReader("src/xml/filteredDataSetTest.xml")); IDataSet dataSet = new CompositeDataSet(dataSet1, dataSet2); assertEquals("count before filter", getExpectedNames().length + 1, dataSet.getTableNames().length); return dataSet; } protected IDataSet createDuplicateDataSet() throws Exception { IDataSet dataSet1 = new XmlDataSet( new FileReader("src/xml/xmlDataSetDuplicateTest.xml")); IDataSet dataSet2 = new XmlDataSet( new FileReader("src/xml/filteredDataSetTest.xml")); IDataSet dataSet = new CompositeDataSet(dataSet1, dataSet2, false); assertEquals("count before filter", getExpectedDuplicateNames().length + 1, dataSet.getTableNames().length); return dataSet; } public abstract void testIsValidName() throws Exception; public abstract void testIsCaseInsensitiveValidName() throws Exception; public abstract void testIsValidNameAndInvalid() throws Exception; public abstract void testGetTableNames() throws Exception; public abstract void testGetDuplicateTableNames() throws Exception; public abstract void testGetCaseInsensitiveTableNames() throws Exception; public abstract void testGetReverseTableNames() throws Exception; public abstract void testGetTables() throws Exception; public abstract void testGetDuplicateTables() throws Exception; public abstract void testGetCaseInsensitiveTables() throws Exception; public abstract void testGetReverseTables() throws Exception; } --- NEW FILE: AllTests.java --- /* * * The DbUnit Database Testing Framework * Copyright (C)2002, Manuel Laflamme * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package org.dbunit.dataset.filter; import junit.framework.TestSuite; import junit.framework.Test; /** * @author Manuel Laflamme * @since Mar 8, 2003 * @version $Revision: 1.1 $ */ public class AllTests { public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(new TestSuite(SequenceTableFilterTest.class)); return suite; } } --- NEW FILE: SequenceTableFilterTest.java --- /* * * The DbUnit Database Testing Framework * Copyright (C)2002, Manuel Laflamme * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package org.dbunit.dataset.filter; import org.dbunit.dataset.*; import org.dbunit.dataset.xml.XmlDataSet; import org.dbunit.database.AmbiguousTableNameException; import junit.framework.TestCase; import java.io.FileReader; import java.util.Arrays; /** * @author Manuel Laflamme * @since Mar 8, 2003 * @version $Revision: 1.1 $ */ public class SequenceTableFilterTest extends AbstractTableFilterTest { public SequenceTableFilterTest(String s) { super(s); } public void testIsValidName() throws Exception { String[] validNames = getExpectedNames(); ITableFilter filter = new SequenceTableFilter(validNames); for (int i = 0; i < validNames.length; i++) { String validName = validNames[i]; assertEquals(validName, true, filter.isValidName(validName)); } } public void testIsValidName2() throws Exception { // String[] validNames = getExpectedNames(); // ITableFilter filter = new SequenceTableFilter(validNames); // // for (int i = 0; i < validNames.length; i++) // { // String validName = validNames[i]; // assertEquals(validName, true, filter.isValidName(validName)); // } } public void testIsCaseInsensitiveValidName() throws Exception { String[] validNames = getExpectedNames(); ITableFilter filter = new SequenceTableFilter(validNames); for (int i = 0; i < validNames.length; i++) { String validName = validNames[i]; assertEquals(validName, true, filter.isValidName(validName)); } } public void testIsValidNameAndInvalid() throws Exception { String[] invalidNames = new String[] { "INVALID_TABLE", "UNKNOWN_TABLE", }; String[] validNames = getExpectedNames(); ITableFilter filter = new SequenceTableFilter(validNames); for (int i = 0; i < invalidNames.length; i++) { String invalidName = invalidNames[i]; assertEquals(invalidName, false, filter.isValidName(invalidName)); } } public void testGetTableNames() throws Exception { String[] expectedNames = getExpectedNames(); ITableFilter filter = new SequenceTableFilter(expectedNames); IDataSet dataSet = createDataSet(); assertTrue("dataset names count", dataSet.getTableNames().length > expectedNames.length); String[] actualNames = filter.getTableNames(dataSet); assertEquals("name count", expectedNames.length, actualNames.length); assertEquals("names", Arrays.asList(expectedNames), Arrays.asList(actualNames)); } public void testGetDuplicateTableNames() throws Exception { String[] expectedNames = getExpectedDuplicateNames(); ITableFilter filter = new SequenceTableFilter(expectedNames); IDataSet dataSet = createDuplicateDataSet(); assertTrue("dataset names count", dataSet.getTableNames().length > expectedNames.length); try { filter.getTableNames(dataSet); fail("Should not be here!"); } catch (AmbiguousTableNameException e) { } } public void testGetCaseInsensitiveTableNames() throws Exception { String[] filterNames = getExpectedNames(); ITableFilter filter = new SequenceTableFilter(filterNames); String[] expectedNames = getExpectedLowerNames(); IDataSet dataSet = new LowerCaseDataSet(createDataSet()); assertTrue("dataset names count", dataSet.getTableNames().length > expectedNames.length); String[] actualNames = filter.getTableNames(dataSet); assertEquals("name count", expectedNames.length, actualNames.length); assertEquals("names", Arrays.asList(expectedNames), Arrays.asList(actualNames)); } public void testGetReverseTableNames() throws Exception { String[] expectedNames = DataSetUtils.reverseStringArray(getExpectedNames()); ITableFilter filter = new SequenceTableFilter(expectedNames); IDataSet dataSet = createDataSet(); assertTrue("dataset names count", dataSet.getTableNames().length > expectedNames.length); String[] actualNames = filter.getTableNames(dataSet); assertEquals("name count", expectedNames.length, actualNames.length); assertEquals("names", Arrays.asList(expectedNames), Arrays.asList(actualNames)); } public void testGetTables() throws Exception { String[] expectedNames = getExpectedNames(); ITableFilter filter = new SequenceTableFilter(expectedNames); IDataSet dataSet = createDataSet(); assertTrue("dataset names count", dataSet.getTableNames().length > expectedNames.length); ITable[] actualTables = filter.getTables(dataSet); String[] actualNames = new DefaultDataSet(actualTables).getTableNames(); assertEquals("table count", expectedNames.length, actualTables.length); assertEquals("table names", Arrays.asList(expectedNames), Arrays.asList(actualNames)); } public void testGetDuplicateTables() throws Exception { String[] expectedNames = getExpectedDuplicateNames(); ITableFilter filter = new SequenceTableFilter(expectedNames); IDataSet dataSet = createDuplicateDataSet(); assertTrue("dataset names count", dataSet.getTableNames().length > expectedNames.length); try { filter.getTables(dataSet); fail("Should not be here!"); } catch (AmbiguousTableNameException e) { } } public void testGetCaseInsensitiveTables() throws Exception { ITableFilter filter = new SequenceTableFilter(getExpectedNames()); String[] lowerNames = getExpectedLowerNames(); IDataSet dataSet = new LowerCaseDataSet(createDataSet()); assertTrue("dataset names count", dataSet.getTableNames().length > lowerNames.length); ITable[] actualTables = filter.getTables(dataSet); String[] actualNames = new DefaultDataSet(actualTables).getTableNames(); assertEquals("table count", lowerNames.length, actualTables.length); assertEquals("table names", Arrays.asList(lowerNames), Arrays.asList(actualNames)); } public void testGetReverseTables() throws Exception { String[] expectedNames = DataSetUtils.reverseStringArray(getExpectedNames()); ITableFilter filter = new SequenceTableFilter(expectedNames); IDataSet dataSet = createDataSet(); assertTrue("dataset names count", dataSet.getTableNames().length > expectedNames.length); ITable[] actualTables = filter.getTables(dataSet); String[] actualNames = new DefaultDataSet(actualTables).getTableNames(); assertEquals("table count", expectedNames.length, actualTables.length); assertEquals("table names", Arrays.asList(expectedNames), Arrays.asList(actualNames)); } } |
From: <mla...@us...> - 2003-03-11 13:03:25
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset In directory sc8-pr-cvs1:/tmp/cvs-serv14356/dbunit/src/java/org/dbunit/dataset Modified Files: IDataSet.java Log Message: Minor javadoc update. Index: IDataSet.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/IDataSet.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** IDataSet.java 13 Feb 2003 04:32:42 -0000 1.10 --- IDataSet.java 11 Mar 2003 13:03:21 -0000 1.11 *************** *** 23,28 **** package org.dbunit.dataset; /** ! * A dataset represents a collection of data from various tables. * * @author Manuel Laflamme --- 23,30 ---- package org.dbunit.dataset; + import org.dbunit.database.AmbiguousTableNameException; + /** ! * Represents a collection of tables. * * @author Manuel Laflamme |
From: <mla...@us...> - 2003-03-11 13:02:55
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset In directory sc8-pr-cvs1:/tmp/cvs-serv14095a/dbunit/src/java/org/dbunit/dataset Modified Files: ITableMetaData.java Log Message: Minor javadoc update. Index: ITableMetaData.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/ITableMetaData.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ITableMetaData.java 13 Jun 2002 17:24:56 -0000 1.8 --- ITableMetaData.java 11 Mar 2003 13:02:52 -0000 1.9 *************** *** 24,28 **** /** ! * Represents metadata of a table. * * @author Manuel Laflamme --- 24,28 ---- /** ! * Represents table metadata. * * @author Manuel Laflamme |
From: <mla...@us...> - 2003-03-11 13:00:11
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/xml In directory sc8-pr-cvs1:/tmp/cvs-serv12876/dbunit/src/java/org/dbunit/dataset/xml Modified Files: FlatXmlDataSet.java XmlDataSet.java Log Message: Deprecated write() methods using OutputStream. Index: FlatXmlDataSet.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** FlatXmlDataSet.java 1 Mar 2003 06:51:17 -0000 1.19 --- FlatXmlDataSet.java 11 Mar 2003 13:00:07 -0000 1.20 *************** *** 237,240 **** --- 237,241 ---- /** * Write the specified dataset to the specified output stream as xml. + * @deprecated Use Writer overload instead */ public static void write(IDataSet dataSet, OutputStream out) Index: XmlDataSet.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/xml/XmlDataSet.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** XmlDataSet.java 1 Mar 2003 06:51:17 -0000 1.14 --- XmlDataSet.java 11 Mar 2003 13:00:07 -0000 1.15 *************** *** 72,86 **** Document document = new Document(in); _tables = getTables(document); - // Elements tableElems = document.getElement("dataset").getElements("table"); - // - // List tableList = new ArrayList(); - // while (tableElems.hasMoreElements()) - // { - // Element tableElem = (Element)tableElems.nextElement(); - // ITable table = new XmlTable(tableElem); - // tableList.add(table); - // } - // - // _tables = (ITable[])tableList.toArray(new ITable[0]); } catch (ParseException e) --- 72,75 ---- *************** *** 107,110 **** --- 96,100 ---- /** * Write the specified dataset to the specified output stream as xml. + * @deprecated Use Writer overload instead */ public static void write(IDataSet dataSet, OutputStream out) |
From: <mla...@us...> - 2003-03-11 13:00:11
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/xml In directory sc8-pr-cvs1:/tmp/cvs-serv12876/dbunit/src/test/org/dbunit/dataset/xml Modified Files: XmlTableWriteTest.java FlatXmlTableWriteTest.java FlatXmlDataSetTest.java Log Message: Deprecated write() methods using OutputStream. Index: XmlTableWriteTest.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/xml/XmlTableWriteTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XmlTableWriteTest.java 14 Feb 2003 03:22:01 -0000 1.5 --- XmlTableWriteTest.java 11 Mar 2003 13:00:07 -0000 1.6 *************** *** 39,80 **** } - // protected ITable createTable() throws Exception - // { - // ITable table = super.createTable(); - // IDataSet dataSet = new DefaultDataSet(table); - // - // File tempFile = File.createTempFile("xmlDataSetWriteTest", "xml"); - // OutputStream out = new FileOutputStream(tempFile); - // try - // { - // // write DefaultTable in temp file - // XmlDataSet.write(dataSet, out); - // - // // load new dataset from temp file - // XmlDataSet xmlDataSet2 = new XmlDataSet(new FileInputStream(tempFile)); - // return xmlDataSet2.getTable(xmlDataSet2.getTableNames()[0]); - // } - // finally - // { - // out.close(); - // tempFile.delete(); - // } - // } - protected IDataSet createDataSet() throws Exception { File tempFile = File.createTempFile("xmlDataSetWriteTest", ".xml"); ! OutputStream out = new FileOutputStream(tempFile); try { // write DefaultTable in temp file ! XmlDataSet.write(super.createDataSet(), out); // load new dataset from temp file ! return new XmlDataSet(new FileReader(tempFile)); } finally { - out.close(); tempFile.delete(); } --- 39,71 ---- } protected IDataSet createDataSet() throws Exception { File tempFile = File.createTempFile("xmlDataSetWriteTest", ".xml"); ! Writer out = new FileWriter(tempFile); try { // write DefaultTable in temp file ! try ! { ! XmlDataSet.write(super.createDataSet(), out); ! } ! finally ! { ! out.close(); ! } // load new dataset from temp file ! FileReader in = new FileReader(tempFile); ! try ! { ! return new XmlDataSet(in); ! } ! finally ! { ! in.close(); ! } } finally { tempFile.delete(); } *************** *** 97,119 **** IDataSet dataSet = new DefaultDataSet(tables); File tempFile = File.createTempFile("xmlDataSetWriteTest", "xml"); ! OutputStream out = new FileOutputStream(tempFile); try { // write DefaultTable in temp file ! XmlDataSet.write(dataSet, out); // load new dataset from temp file ! XmlDataSet xmlDataSet2 = new XmlDataSet(new FileReader(tempFile)); ! // verify each table ! for (int i = 0; i < tables.length; i++) { ! ITable table = tables[i]; ! Assertion.assertEquals(table, xmlDataSet2.getTable(xmlDataSet2.getTableNames()[i])); } } finally { - out.close(); tempFile.delete(); } --- 88,124 ---- IDataSet dataSet = new DefaultDataSet(tables); File tempFile = File.createTempFile("xmlDataSetWriteTest", "xml"); ! Writer out = new FileWriter(tempFile); try { // write DefaultTable in temp file ! try ! { ! XmlDataSet.write(dataSet, out); ! } ! finally ! { ! out.close(); ! } // load new dataset from temp file ! FileReader in = new FileReader(tempFile); ! try ! { ! XmlDataSet xmlDataSet2 = new XmlDataSet(in); ! // verify each table ! for (int i = 0; i < tables.length; i++) ! { ! ITable table = tables[i]; ! Assertion.assertEquals(table, xmlDataSet2.getTable(xmlDataSet2.getTableNames()[i])); ! } ! } ! finally { ! in.close(); } } finally { tempFile.delete(); } Index: FlatXmlTableWriteTest.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/xml/FlatXmlTableWriteTest.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FlatXmlTableWriteTest.java 24 Feb 2003 02:37:22 -0000 1.9 --- FlatXmlTableWriteTest.java 11 Mar 2003 13:00:07 -0000 1.10 *************** *** 42,58 **** { File tempFile = File.createTempFile("flatXmlTableWriteTest", ".xml"); ! OutputStream out = new FileOutputStream(tempFile); try { // write DefaultTable in temp file ! FlatXmlDataSet.write(super.createDataSet(true), out); // load new dataset from temp file ! return new FlatXmlDataSet(new FileReader(tempFile)); } finally { ! out.close(); ! // tempFile.delete(); } } --- 42,72 ---- { File tempFile = File.createTempFile("flatXmlTableWriteTest", ".xml"); ! Writer out = new FileWriter(tempFile); try { // write DefaultTable in temp file ! try ! { ! FlatXmlDataSet.write(super.createDataSet(true), out); ! } ! finally ! { ! out.close(); ! } // load new dataset from temp file ! FileReader in = new FileReader(tempFile); ! try ! { ! return new FlatXmlDataSet(in); ! } ! finally ! { ! in.close(); ! } } finally { ! tempFile.delete(); } } *************** *** 73,96 **** IDataSet dataSet = new DefaultDataSet(tables); File tempFile = File.createTempFile("flatXmlTableWriteTest", "xml"); ! OutputStream out = new FileOutputStream(tempFile); try { // write DefaultTable in temp file ! FlatXmlDataSet.write(dataSet, out); // load new dataset from temp file ! FlatXmlDataSet xmlDataSet2 = new FlatXmlDataSet( ! new FileReader(tempFile)); ! // verify each table ! for (int i = 0; i < tables.length; i++) { ! ITable table = tables[i]; ! Assertion.assertEquals(table, xmlDataSet2.getTable(xmlDataSet2.getTableNames()[i])); } } finally { - out.close(); tempFile.delete(); } --- 87,123 ---- IDataSet dataSet = new DefaultDataSet(tables); File tempFile = File.createTempFile("flatXmlTableWriteTest", "xml"); ! Writer out = new FileWriter(tempFile); try { // write DefaultTable in temp file ! try ! { ! FlatXmlDataSet.write(dataSet, out); ! } ! finally ! { ! out.close(); ! } // load new dataset from temp file ! FileReader in = new FileReader(tempFile); ! try ! { ! FlatXmlDataSet xmlDataSet2 = new FlatXmlDataSet(in); ! // verify each table ! for (int i = 0; i < tables.length; i++) ! { ! ITable table = tables[i]; ! Assertion.assertEquals(table, xmlDataSet2.getTable(xmlDataSet2.getTableNames()[i])); ! } ! } ! finally { ! in.close(); } } finally { tempFile.delete(); } Index: FlatXmlDataSetTest.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/xml/FlatXmlDataSetTest.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** FlatXmlDataSetTest.java 15 Feb 2003 05:42:43 -0000 1.12 --- FlatXmlDataSetTest.java 11 Mar 2003 13:00:07 -0000 1.13 *************** *** 24,32 **** import org.dbunit.Assertion; ! import org.dbunit.dataset.*; ! import java.io.*; ! import java.util.ArrayList; ! import java.util.List; /** --- 24,36 ---- import org.dbunit.Assertion; ! import org.dbunit.dataset.AbstractDataSetTest; ! import org.dbunit.dataset.Column; ! import org.dbunit.dataset.IDataSet; ! import org.dbunit.dataset.ITable; ! import java.io.File; ! import java.io.FileReader; ! import java.io.FileWriter; ! import java.io.Writer; /** *************** *** 76,94 **** public void testWrite() throws Exception { ! List tableList = new ArrayList(); ! ! IDataSet expectedDataSet = (FlatXmlDataSet)createDataSet(); File tempFile = File.createTempFile("flatXmlDataSetTest", ".xml"); try { ! OutputStream out = new FileOutputStream(tempFile); try { - // write dataset in temp file FlatXmlDataSet.write(expectedDataSet, out); ! // load new dataset from temp file ! IDataSet actualDataSet = new FlatXmlDataSet(new FileReader(tempFile)); // verify table count --- 80,104 ---- public void testWrite() throws Exception { ! IDataSet expectedDataSet = createDataSet(); File tempFile = File.createTempFile("flatXmlDataSetTest", ".xml"); try { ! Writer out = new FileWriter(tempFile); + // write dataset in temp file try { FlatXmlDataSet.write(expectedDataSet, out); + } + finally + { + out.close(); + } ! // load new dataset from temp file ! FileReader in = new FileReader(tempFile); ! try ! { ! IDataSet actualDataSet = new FlatXmlDataSet(in); // verify table count *************** *** 112,116 **** finally { ! out.close(); } } --- 122,126 ---- finally { ! in.close(); } } *************** *** 123,141 **** public void testDuplicateWrite() throws Exception { - List tableList = new ArrayList(); - IDataSet expectedDataSet = createDuplicateDataSet(); File tempFile = File.createTempFile("flatXmlDataSetDuplicateTest", ".xml"); try { ! OutputStream out = new FileOutputStream(tempFile); try { - // write dataset in temp file FlatXmlDataSet.write(expectedDataSet, out); ! // load new dataset from temp file ! IDataSet actualDataSet = new FlatXmlDataSet(new FileReader(tempFile)); // verify table count --- 133,157 ---- public void testDuplicateWrite() throws Exception { IDataSet expectedDataSet = createDuplicateDataSet(); File tempFile = File.createTempFile("flatXmlDataSetDuplicateTest", ".xml"); try { ! Writer out = new FileWriter(tempFile); + // write dataset in temp file try { FlatXmlDataSet.write(expectedDataSet, out); + } + finally + { + out.close(); + } ! // load new dataset from temp file ! FileReader in = new FileReader(tempFile); ! try ! { ! IDataSet actualDataSet = new FlatXmlDataSet(in); // verify table count *************** *** 159,163 **** finally { ! out.close(); } } --- 175,179 ---- finally { ! in.close(); } } |
From: <mla...@us...> - 2003-03-11 12:56:25
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset In directory sc8-pr-cvs1:/tmp/cvs-serv11020/dbunit/src/java/org/dbunit/dataset Modified Files: DefaultDataSet.java Log Message: New mutator method to add a table in the dataset. Index: DefaultDataSet.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/DefaultDataSet.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DefaultDataSet.java 3 Aug 2002 02:26:40 -0000 1.8 --- DefaultDataSet.java 11 Mar 2003 12:56:21 -0000 1.9 *************** *** 23,26 **** --- 23,30 ---- package org.dbunit.dataset; + import java.util.List; + import java.util.ArrayList; + import java.util.Arrays; + /** *************** *** 30,43 **** public class DefaultDataSet extends AbstractDataSet { ! private final ITable[] _tables; public DefaultDataSet(ITable table) { ! _tables = new ITable[]{table}; } public DefaultDataSet(ITable[] tables) { ! _tables = tables; } --- 34,58 ---- public class DefaultDataSet extends AbstractDataSet { ! private final List _tableList = new ArrayList(); public DefaultDataSet(ITable table) { ! addTable(table); } public DefaultDataSet(ITable[] tables) { ! for (int i = 0; i < tables.length; i++) ! { ! addTable(tables[i]); ! } ! } ! ! /** ! * Add a new table in this dataset. ! */ ! public void addTable(ITable table) ! { ! _tableList.add(table); } *************** *** 47,51 **** public ITable[] getTables() throws DataSetException { ! return cloneTables(_tables); } } --- 62,66 ---- public ITable[] getTables() throws DataSetException { ! return (ITable[])_tableList.toArray(new ITable[0]); } } |
From: <mla...@us...> - 2003-03-05 02:54:20
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/operation In directory sc8-pr-cvs1:/tmp/cvs-serv3264/dbunit/src/java/org/dbunit/operation Modified Files: RefreshOperation.java Log Message: Major refactoring and optimization of the refresh operation. Index: RefreshOperation.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/operation/RefreshOperation.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** RefreshOperation.java 14 Feb 2003 17:22:21 -0000 1.21 --- RefreshOperation.java 5 Mar 2003 02:54:17 -0000 1.22 *************** *** 52,191 **** } ! private boolean rowExist(PreparedStatement statement, ! Column[] columns, ITable table, int row) ! throws DataSetException, SQLException { ! for (int i = 0; i < columns.length; i++) ! { ! Object value = table.getValue(row, columns[i].getColumnName()); ! DataType dataType = columns[i].getDataType(); ! statement.setObject(i + 1, dataType.typeCast(value), ! dataType.getSqlType()); ! } ! ResultSet resultSet = statement.executeQuery(); ! try ! { ! resultSet.next(); ! return resultSet.getInt(1) > 0; ! } ! finally { ! resultSet.close(); } } ! public OperationData getSelectCountData(String schemaName, ! ITableMetaData metaData) throws DataSetException { ! Column[] primaryKeys = metaData.getPrimaryKeys(); ! ! // cannot construct where clause if no primary key ! if (primaryKeys.length == 0) { ! throw new NoPrimaryKeyException(metaData.getTableName()); } ! // select count ! StringBuffer sqlBuffer = new StringBuffer(128); ! sqlBuffer.append("select COUNT(*) from "); ! sqlBuffer.append(DataSetUtils.getQualifiedName(schemaName, ! metaData.getTableName(), true)); ! // where ! sqlBuffer.append(" where "); ! for (int i = 0; i < primaryKeys.length; i++) ! { ! Column column = primaryKeys[i]; ! if (i > 0) { ! sqlBuffer.append(" and "); } ! sqlBuffer.append(column.getColumnName()); ! sqlBuffer.append(" = ?"); } ! return new OperationData(sqlBuffer.toString(), primaryKeys); } ! private int executeRowOperation(IPreparedBatchStatement statement, ! Column[] columns, ITable table, int row) ! throws DataSetException, SQLException { ! for (int i = 0; i < columns.length; i++) { ! Object value = table.getValue(row, columns[i].getColumnName()); ! statement.addValue(value, columns[i].getDataType()); } - statement.addBatch(); - int result = statement.executeBatch(); - statement.clearBatch(); - - return result; } ! //////////////////////////////////////////////////////////////////////////// ! // DatabaseOperation class ! ! public void execute(IDatabaseConnection connection, IDataSet dataSet) ! throws DatabaseUnitException, SQLException { ! IStatementFactory factory = connection.getStatementFactory(); ! String schema = connection.getSchema(); ! // for each table ! ITable[] tables = dataSet.getTables(); ! for (int i = 0; i < tables.length; i++) { ! // do not process empty table ! ITable table = tables[i]; ! if (table.getRowCount() == 0) ! { ! continue; ! } ! ITableMetaData metaData = AbstractBatchOperation.getOperationMetaData( ! connection, table.getTableMetaData()); // setup select count statement OperationData countData = getSelectCountData(schema, metaData); ! PreparedStatement countStatement = ! connection.getConnection().prepareStatement(countData.getSql()); ! // setup insert statement ! OperationData insertData = _insertOperation.getOperationData(schema, metaData); ! IPreparedBatchStatement insertStatement = ! factory.createPreparedBatchStatement(insertData.getSql(), connection); ! // setup update statement ! OperationData updateData = _updateOperation.getOperationData(schema, metaData); ! IPreparedBatchStatement updateStatement = ! factory.createPreparedBatchStatement(updateData.getSql(), connection); ! // refresh each table's row ! for (int j = 0; j < table.getRowCount(); j++) { ! // verify if row exist ! if (rowExist(countStatement, countData.getColumns(), table, j)) ! { ! // update only if columns are not all primary keys ! if (metaData.getColumns().length > metaData.getPrimaryKeys().length) ! { ! // update row ! executeRowOperation(updateStatement, updateData.getColumns(), ! table, j); ! } ! } ! else { ! // insert row ! executeRowOperation(insertStatement, insertData.getColumns(), ! table, j); } } } } } --- 52,274 ---- } ! //////////////////////////////////////////////////////////////////////////// ! // DatabaseOperation class ! ! public void execute(IDatabaseConnection connection, IDataSet dataSet) ! throws DatabaseUnitException, SQLException { ! IStatementFactory factory = connection.getStatementFactory(); ! String schema = connection.getSchema(); ! // for each table ! ITable[] tables = dataSet.getTables(); ! for (int i = 0; i < tables.length; i++) { ! // do not process empty table ! ITable table = tables[i]; ! if (table.getRowCount() == 0) ! { ! continue; ! } ! ! ITableMetaData metaData = AbstractBatchOperation.getOperationMetaData( ! connection, table.getTableMetaData()); ! RowOperation updateRowOperation = createUpdateOperation(connection, ! factory, schema, metaData); ! RowOperation insertRowOperation = new InsertRowOperation(connection, ! factory, schema, metaData); ! ! // refresh all rows ! for (int j = 0; j < table.getRowCount(); j++) ! { ! if (!updateRowOperation.execute(table, j)) ! { ! insertRowOperation.execute(table, j); ! } ! } ! ! // cleanup ! updateRowOperation.close(); ! insertRowOperation.close(); } + } ! private RowOperation createUpdateOperation(IDatabaseConnection connection, ! IStatementFactory factory, String schema, ITableMetaData metaData) ! throws DataSetException, SQLException { ! // update only if columns are not all primary keys ! if (metaData.getColumns().length > metaData.getPrimaryKeys().length) { ! return new UpdateRowOperation(connection, factory, schema, metaData); } ! // otherwise, operation only verify if row exist ! return new RowExistOperation(connection, factory, schema, metaData); ! } ! /** ! * This class represents a operation executable on a single table row. ! */ ! class RowOperation ! { ! protected IPreparedBatchStatement _statement; ! protected Column[] _columns; ! /** ! * Execute this operation on the sepcfied table row. ! * @return <code>true</code> if operation have been executed on the row. ! */ ! public boolean execute(ITable table, int row) ! throws DataSetException, SQLException ! { ! for (int i = 0; i < _columns.length; i++) { ! Object value = table.getValue(row, _columns[i].getColumnName()); ! _statement.addValue(value, _columns[i].getDataType()); } ! _statement.addBatch(); ! int result = _statement.executeBatch(); ! _statement.clearBatch(); ! ! return result == 1; } ! /** ! * Cleanup this operation state. ! */ ! public void close() throws SQLException ! { ! _statement.close(); ! } } ! /** ! * Insert row operation. ! */ ! private class InsertRowOperation extends RowOperation { ! public InsertRowOperation(IDatabaseConnection connection, ! IStatementFactory factory, String schema, ITableMetaData metaData) ! throws DataSetException, SQLException { ! // setup insert statement ! OperationData insertData = _insertOperation.getOperationData(schema, ! metaData); ! _statement = factory.createPreparedBatchStatement( ! insertData.getSql(), connection); ! _columns = insertData.getColumns(); } } ! /** ! * Update row operation. ! */ ! private class UpdateRowOperation extends RowOperation { ! PreparedStatement _countStatement; ! public UpdateRowOperation(IDatabaseConnection connection, ! IStatementFactory factory, String schema, ITableMetaData metaData) ! throws DataSetException, SQLException { ! // setup update statement ! OperationData updateData = _updateOperation.getOperationData(schema, ! metaData); ! _statement = factory.createPreparedBatchStatement( ! updateData.getSql(), connection); ! _columns = updateData.getColumns(); ! } ! } ! /** ! * This operation verify if a row exists in the database. ! */ ! private class RowExistOperation extends RowOperation ! { ! PreparedStatement _countStatement; + public RowExistOperation(IDatabaseConnection connection, + IStatementFactory factory, String schema, ITableMetaData metaData) + throws DataSetException, SQLException + { // setup select count statement OperationData countData = getSelectCountData(schema, metaData); ! _countStatement = connection.getConnection().prepareStatement( ! countData.getSql()); ! _columns = countData.getColumns(); ! } ! private OperationData getSelectCountData(String schemaName, ! ITableMetaData metaData) throws DataSetException ! { ! Column[] primaryKeys = metaData.getPrimaryKeys(); ! // cannot construct where clause if no primary key ! if (primaryKeys.length == 0) ! { ! throw new NoPrimaryKeyException(metaData.getTableName()); ! } ! // select count ! StringBuffer sqlBuffer = new StringBuffer(128); ! sqlBuffer.append("select COUNT(*) from "); ! sqlBuffer.append(DataSetUtils.getQualifiedName(schemaName, ! metaData.getTableName(), true)); ! ! // where ! sqlBuffer.append(" where "); ! for (int i = 0; i < primaryKeys.length; i++) { ! Column column = primaryKeys[i]; ! ! if (i > 0) { ! sqlBuffer.append(" and "); } + sqlBuffer.append(column.getColumnName()); + sqlBuffer.append(" = ?"); + } + + return new OperationData(sqlBuffer.toString(), primaryKeys); + } + + //////////////////////////////////////////////////////////////////////// + // RowOperation class + + /** + * Verify if the specified table row exists in the database. + * @return <code>true</code> if row exists. + */ + public boolean execute(ITable table, int row) + throws DataSetException, SQLException + { + for (int i = 0; i < _columns.length; i++) + { + Object value = table.getValue(row, _columns[i].getColumnName()); + DataType dataType = _columns[i].getDataType(); + _countStatement.setObject(i + 1, dataType.typeCast(value), + dataType.getSqlType()); + } + + ResultSet resultSet = _countStatement.executeQuery(); + try + { + resultSet.next(); + return resultSet.getInt(1) > 0; + } + finally + { + resultSet.close(); } } + public void close() throws SQLException + { + _countStatement.close(); + } } + } |
From: <mla...@us...> - 2003-03-05 02:54:20
|
Update of /cvsroot/dbunit/./dbunit/src/xml In directory sc8-pr-cvs1:/tmp/cvs-serv3264/dbunit/src/xml Modified Files: flatXmlDataSetTest.xml Added Files: refreshOperationNoPKTest.xml updateOperationNoPKTest.xml Log Message: Major refactoring and optimization of the refresh operation. --- NEW FILE: refreshOperationNoPKTest.xml --- <dataset> <TEST_TABLE COLUMN0="row 0 col 0" COLUMN1="row 0 col 1" COLUMN2="row 0 col 2" COLUMN3="row 0 col 3"/> <TEST_TABLE COLUMN0="row 6 col 0" COLUMN1="row 6 col 1" COLUMN2="row 6 col 2" COLUMN3="row 6 col 3"/> </dataset> --- NEW FILE: updateOperationNoPKTest.xml --- <dataset> <TEST_TABLE COLUMN0="row 0 col 0" COLUMN1="row 0 col 1" COLUMN2="row 0 col 2" COLUMN3="row 0 col 3"/> <TEST_TABLE COLUMN0="row 6 col 0" COLUMN1="row 6 col 1" COLUMN2="row 6 col 2" COLUMN3="row 6 col 3"/> </dataset> Index: flatXmlDataSetTest.xml =================================================================== RCS file: /cvsroot/dbunit/./dbunit/src/xml/flatXmlDataSetTest.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** flatXmlDataSetTest.xml 26 Mar 2002 15:40:11 -0000 1.3 --- flatXmlDataSetTest.xml 5 Mar 2003 02:54:16 -0000 1.4 *************** *** 1,3 **** ! <!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Manuel Laflamme (Java development) --> <dataset> <TEST_TABLE COLUMN0="row 0 col 0" COLUMN1="row 0 col 1" COLUMN2="row 0 col 2" COLUMN3="row 0 col 3"/> --- 1,3 ---- ! <!-- edited with XML Spy v4.1 U (http://www.xmlspy.com) by Stephane Besson (R&D) --> <dataset> <TEST_TABLE COLUMN0="row 0 col 0" COLUMN1="row 0 col 1" COLUMN2="row 0 col 2" COLUMN3="row 0 col 3"/> *************** *** 20,22 **** <EMPTY_MULTITYPE_TABLE/> </dataset> - --- 20,21 ---- |
From: <mla...@us...> - 2003-03-05 02:54:20
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit/operation In directory sc8-pr-cvs1:/tmp/cvs-serv3264/dbunit/src/test/org/dbunit/operation Modified Files: UpdateOperationTest.java RefreshOperationTest.java Log Message: Major refactoring and optimization of the refresh operation. Index: UpdateOperationTest.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/operation/UpdateOperationTest.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** UpdateOperationTest.java 15 Feb 2003 05:42:42 -0000 1.16 --- UpdateOperationTest.java 5 Mar 2003 02:54:16 -0000 1.17 *************** *** 246,264 **** } - public void testExecuteAndNoPrimaryKey() throws Exception - { - IDataSet dataSet = _connection.createDataSet(); - ITableMetaData metaData = dataSet.getTableMetaData("TEST_TABLE"); - try - { - new UpdateOperation().getOperationData( - _connection.getSchema(), metaData); - fail("Should throw a NoPrimaryKeyException"); - } - catch (NoPrimaryKeyException e) - { - } - } - public void testUpdateClob() throws Exception { --- 246,249 ---- *************** *** 340,343 **** --- 325,352 ---- testExecute(new LowerCaseDataSet(dataSet)); + } + + public void testExecuteAndNoPrimaryKeys() throws Exception + { + String tableName = "TEST_TABLE"; + + Reader reader = new FileReader("src/xml/updateOperationNoPKTest.xml"); + IDataSet dataSet = new FlatXmlDataSet(reader); + + // verify table before + assertEquals("row count before", 6, _connection.getRowCount(tableName)); + + try + { + DatabaseOperation.REFRESH.execute(_connection, dataSet); + fail("Should not be here!"); + } + catch (NoPrimaryKeyException e) + { + + } + + // verify table after + assertEquals("row count before", 6, _connection.getRowCount(tableName)); } Index: RefreshOperationTest.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/operation/RefreshOperationTest.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** RefreshOperationTest.java 15 Feb 2003 05:42:42 -0000 1.11 --- RefreshOperationTest.java 5 Mar 2003 02:54:16 -0000 1.12 *************** *** 25,28 **** --- 25,29 ---- import org.dbunit.AbstractDatabaseTest; import org.dbunit.Assertion; + import org.dbunit.DatabaseUnitException; import org.dbunit.database.MockDatabaseConnection; import org.dbunit.database.statement.MockStatementFactory; *************** *** 35,38 **** --- 36,40 ---- import java.io.Reader; import java.util.ArrayList; + import java.sql.SQLException; /** *************** *** 89,92 **** --- 91,118 ---- Assertion.assertEquals(expectedTable, tableAfter); } + } + + public void testExecuteAndNoPrimaryKeys() throws Exception + { + String tableName = "TEST_TABLE"; + + Reader reader = new FileReader("src/xml/refreshOperationNoPKTest.xml"); + IDataSet dataSet = new FlatXmlDataSet(reader); + + // verify table before + assertEquals("row count before", 6, _connection.getRowCount(tableName)); + + try + { + DatabaseOperation.REFRESH.execute(_connection, dataSet); + fail("Should not be here!"); + } + catch (NoPrimaryKeyException e) + { + + } + + // verify table after + assertEquals("row count before", 6, _connection.getRowCount(tableName)); } |
From: <mla...@us...> - 2003-03-04 00:14:37
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit In directory sc8-pr-cvs1:/tmp/cvs-serv14817/dbunit/src/test/org/dbunit Modified Files: Main.java Log Message: Removed unused imports. Index: Main.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/Main.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Main.java 1 Mar 2003 06:51:17 -0000 1.27 --- Main.java 4 Mar 2003 00:14:32 -0000 1.28 *************** *** 24,41 **** import org.dbunit.database.IDatabaseConnection; - import org.dbunit.dataset.xml.XmlDataSet; import org.dbunit.dataset.xml.FlatXmlDataSet; - import org.dbunit.dataset.IDataSet; - import org.dbunit.dataset.DataSetException; - import org.dbunit.dataset.excel.XlsDataSet; - import org.dbunit.operation.DatabaseOperation; - - import org.apache.poi.hssf.usermodel.*; - import org.apache.poi.poifs.filesystem.POIFSFileSystem; - - import java.io.*; - import java.util.Date; import electric.xml.Document; /** --- 24,33 ---- import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.xml.FlatXmlDataSet; import electric.xml.Document; + + import java.io.FileWriter; + import java.io.Writer; /** |
From: <mla...@us...> - 2003-03-02 05:04:42
|
Update of /cvsroot/dbunit/dbunit In directory sc8-pr-cvs1:/tmp/cvs-serv27400/dbunit Modified Files: readme.txt Log Message: Updated the product description (again) to make it clear that DbUnit is not meant to export huge database. I also updated the live website and rerelease the DbUnit download package. Index: readme.txt =================================================================== RCS file: /cvsroot/dbunit/dbunit/readme.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** readme.txt 1 Mar 2003 16:02:29 -0000 1.5 --- readme.txt 2 Mar 2003 05:04:38 -0000 1.6 *************** *** 3,18 **** --- ! DbUnit is a JUnit extension targeted for database-driven projects that, among ! other things, puts your database into a known state between test runs. This is ! an excellent way to avoid the myriad of problems that can occur when one test ! case corrupts the database and causes subsequent tests to fail or exacerbate ! the damage. - Main features: - * Ability to export and import your database (or specified tables) content to - and from XML datasets. - * Assert facility to verify that your database content match expected data - during your tests. - * Ant integration. --- 3,21 ---- --- ! DbUnit is a JUnit extension (also usable from Ant) targeted ! for database-driven projects that, among other things, puts ! your database into a known state between test runs. This is ! an excellent way to avoid the myriad of problems that can ! occur when one test case corrupts the database and causes ! subsequent tests to fail or exacerbate the damage. ! ! DbUnit has the ability to export and import your database ! (or specified tables) content to and from XML datasets. This ! is targeted for functional testing, so this is not the ! perfect tool to backup a huge production database. ! ! DbUnit also provides assert facility to verify that your ! database content match some expected values. |
From: <mla...@us...> - 2003-03-02 05:04:41
|
Update of /cvsroot/dbunit/dbunit/docs In directory sc8-pr-cvs1:/tmp/cvs-serv27400/dbunit/docs Modified Files: index.html Log Message: Updated the product description (again) to make it clear that DbUnit is not meant to export huge database. I also updated the live website and rerelease the DbUnit download package. Index: index.html =================================================================== RCS file: /cvsroot/dbunit/dbunit/docs/index.html,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** index.html 1 Mar 2003 17:09:57 -0000 1.27 --- index.html 2 Mar 2003 05:04:36 -0000 1.28 *************** *** 45,61 **** <td class="body" valign="top"> <!-- #BeginEditable "body" --> <h2>The Dbunit Database Testing Framework</h2> ! <p>DbUnit is a JUnit extension targeted for database-driven projects that, ! among other things, puts your database into a known state between test ! runs. This is an excellent way to avoid the myriad of problems that can ! occur when one test case corrupts the database and causes subsequent tests ! to fail or exacerbate the damage.</p> ! <p>Main features: </p> ! <ul> ! <li>Ability to export and import your database (or specified tables) content ! to and from XML datasets.</li> ! <li>Assert facility to verify that your database content match expected ! data during your tests.</li> ! <li>Ant integration.</li> ! </ul> <a name="intro"> <h2>News</h2> --- 45,58 ---- <td class="body" valign="top"> <!-- #BeginEditable "body" --> <h2>The Dbunit Database Testing Framework</h2> ! <p>DbUnit is a JUnit extension (also usable from Ant) targeted for database-driven ! projects that, among other things, puts your database into a known state ! between test runs. This is an excellent way to avoid the myriad of problems ! that can occur when one test case corrupts the database and causes subsequent ! tests to fail or exacerbate the damage.</p> ! <p>DbUnit has the ability to export and import your database (or specified ! tables) content to and from XML datasets. This is targeted for functional ! testing, so this is not the perfect tool to backup a huge production database.</p> ! <p>DbUnit also provides assert facility to verify that your database content ! match some expected values.</p> <a name="intro"> <h2>News</h2> |
From: <mla...@us...> - 2003-03-01 17:29:54
|
Update of /cvsroot/dbunit/dbunit In directory sc8-pr-cvs1:/tmp/cvs-serv9184/dbunit Modified Files: dbunit.iws Log Message: Fixed download link of version 1.5. Index: dbunit.iws =================================================================== RCS file: /cvsroot/dbunit/dbunit/dbunit.iws,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dbunit.iws 1 Mar 2003 16:02:28 -0000 1.5 --- dbunit.iws 1 Mar 2003 17:29:51 -0000 1.6 *************** *** 22,65 **** <source-position-entry url="file://$PROJECT_DIR$/src/xml/compositeDataSetDuplicateTest2.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> <source-position-entry url="file://$PROJECT_DIR$/src/xml/caseInsensitiveDataSetDuplicateTest.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.13357401" horizontal-scroll-proportion="0.11419249"> ! <folding> ! <element signature="imports" expanded="true" /> ! </folding> ! </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="0.33393502" horizontal-scroll-proportion="0.14845024" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="0.77075815" horizontal-scroll-proportion="0.3882545"> ! <folding> ! <element signature="imports" expanded="true" /> ! </folding> ! </source-position-entry> </history> <open-files> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.13357401" horizontal-scroll-proportion="0.11419249"> ! <folding> ! <element signature="imports" expanded="true" /> ! </folding> ! </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="0.77075815" horizontal-scroll-proportion="0.3882545" selected="true"> ! <folding> ! <element signature="imports" expanded="true" /> ! </folding> ! </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="0.33393502" horizontal-scroll-proportion="0.14845024" /> </open-files> </component> <component name="ToolWindowManager"> ! <frame x="0" y="0" width="1024" height="738" extended-state="1" /> <editor active="false" /> <layout> ! <window_info id="Ant Build" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.175813" order="3" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.38311687" order="2" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" /> ! <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.29815573" order="0" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3993808" order="3" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.48701298" order="1" /> ! <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3961039" order="8" x="20" y="232" width="984" height="274" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="6" /> <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" /> --- 22,49 ---- <source-position-entry url="file://$PROJECT_DIR$/src/xml/compositeDataSetDuplicateTest2.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> <source-position-entry url="file://$PROJECT_DIR$/src/xml/caseInsensitiveDataSetDuplicateTest.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.85064936" horizontal-scroll-proportion="0.0952381" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="2.168831" horizontal-scroll-proportion="0.123809524" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="5.0" horizontal-scroll-proportion="0.32380953" /> </history> <open-files> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.85064936" horizontal-scroll-proportion="0.0952381" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="5.0" horizontal-scroll-proportion="0.32380953" selected="true" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="2.168831" horizontal-scroll-proportion="0.123809524" /> </open-files> </component> <component name="ToolWindowManager"> ! <frame x="0" y="0" width="1024" height="738" extended-state="0" /> <editor active="false" /> <layout> ! <window_info id="Ant Build" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.17315574" order="3" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.38311687" order="2" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" /> ! <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.29713115" order="0" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3993808" order="3" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.48701298" order="1" /> ! <window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.3963816" order="8" x="20" y="232" width="984" height="274" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="6" /> <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" /> *************** *** 266,277 **** <navigator currentView="SourcepathPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" /> <view id="ProjectPane"> - <expanded_node type="directory" url="file://$PROJECT_DIR$/src" /> - <expanded_node type="directory" url="file://$PROJECT_DIR$/src/xml" /> <expanded_node type="directory" url="file://$PROJECT_DIR$" /> </view> <view id="SourcepathPane"> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java" /> - <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org" /> </view> <view id="ClasspathPane" /> --- 250,259 ---- <navigator currentView="SourcepathPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" /> <view id="ProjectPane"> <expanded_node type="directory" url="file://$PROJECT_DIR$" /> </view> <view id="SourcepathPane"> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org" /> + <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit" /> </view> <view id="ClasspathPane" /> |
From: <mla...@us...> - 2003-03-01 17:29:54
|
Update of /cvsroot/dbunit/dbunit/docs In directory sc8-pr-cvs1:/tmp/cvs-serv9184/dbunit/docs Modified Files: download.html Log Message: Fixed download link of version 1.5. Index: download.html =================================================================== RCS file: /cvsroot/dbunit/dbunit/docs/download.html,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** download.html 26 Feb 2003 22:52:46 -0000 1.21 --- download.html 1 Mar 2003 17:29:51 -0000 1.22 *************** *** 47,51 **** <p>The current Dbunit release is version 1.5. The distribution archive contains the compiled classes, the java code and the java API documentation.</p> ! <p><a href="http://sourceforge.net/project/shownotes.php?release_id=142893">Download version 1.5</a></p> <p>If your are not reading this page online, please visit the <a href="http://www.dbunit.org">online --- 47,51 ---- <p>The current Dbunit release is version 1.5. The distribution archive contains the compiled classes, the java code and the java API documentation.</p> ! <p><a href="http://sourceforge.net/project/showfiles.php?group_id=47439&release_id=142893">Download version 1.5</a></p> <p>If your are not reading this page online, please visit the <a href="http://www.dbunit.org">online |
From: <mla...@us...> - 2003-03-01 17:10:01
|
Update of /cvsroot/dbunit/dbunit/docs In directory sc8-pr-cvs1:/tmp/cvs-serv31562/dbunit/docs Modified Files: index.html Log Message: Updated DbUnit 1.5 release date. Index: index.html =================================================================== RCS file: /cvsroot/dbunit/dbunit/docs/index.html,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** index.html 1 Mar 2003 16:02:32 -0000 1.26 --- index.html 1 Mar 2003 17:09:57 -0000 1.27 *************** *** 62,66 **** </a> <ul> ! <li>2003-??-?? - Version 1.5 released. See <a href="changes.html#1.5">changes</a>.</li> <li>2002-11-07 - Eric Pugh joined the DbUnit developement team.</li> <li>2002-07-17 - The java API documentation is now available <a href="api/index.html">online</a>.</li> --- 62,66 ---- </a> <ul> ! <li>2003-03-01 - Version 1.5 released. See <a href="changes.html#1.5">changes</a>.</li> <li>2002-11-07 - Eric Pugh joined the DbUnit developement team.</li> <li>2002-07-17 - The java API documentation is now available <a href="api/index.html">online</a>.</li> |
From: <mla...@us...> - 2003-03-01 16:03:05
|
Update of /cvsroot/dbunit/dbunit In directory sc8-pr-cvs1:/tmp/cvs-serv20944/dbunit Modified Files: dbunit.iws readme.txt Log Message: Updated product description. Index: dbunit.iws =================================================================== RCS file: /cvsroot/dbunit/dbunit/dbunit.iws,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dbunit.iws 1 Mar 2003 06:51:17 -0000 1.4 --- dbunit.iws 1 Mar 2003 16:02:28 -0000 1.5 *************** *** 22,32 **** <source-position-entry url="file://$PROJECT_DIR$/src/xml/compositeDataSetDuplicateTest2.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> <source-position-entry url="file://$PROJECT_DIR$/src/xml/caseInsensitiveDataSetDuplicateTest.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.13167259" horizontal-scroll-proportion="0.11326861"> <folding> <element signature="imports" expanded="true" /> </folding> </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="0.3291815" horizontal-scroll-proportion="0.14724919" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="0.7597865" horizontal-scroll-proportion="0.38511327"> <folding> <element signature="imports" expanded="true" /> --- 22,32 ---- <source-position-entry url="file://$PROJECT_DIR$/src/xml/compositeDataSetDuplicateTest2.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> <source-position-entry url="file://$PROJECT_DIR$/src/xml/caseInsensitiveDataSetDuplicateTest.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.13357401" horizontal-scroll-proportion="0.11419249"> <folding> <element signature="imports" expanded="true" /> </folding> </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="0.33393502" horizontal-scroll-proportion="0.14845024" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="0.77075815" horizontal-scroll-proportion="0.3882545"> <folding> <element signature="imports" expanded="true" /> *************** *** 35,54 **** </history> <open-files> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.13167259" horizontal-scroll-proportion="0.11326861"> <folding> <element signature="imports" expanded="true" /> </folding> </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="0.7597865" horizontal-scroll-proportion="0.38511327" selected="true"> <folding> <element signature="imports" expanded="true" /> </folding> </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="0.3291815" horizontal-scroll-proportion="0.14724919" /> </open-files> </component> <component name="ToolWindowManager"> ! <frame x="-4" y="-4" width="1032" height="746" extended-state="0" /> ! <editor active="true" /> <layout> <window_info id="Ant Build" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.175813" order="3" /> --- 35,54 ---- </history> <open-files> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.13357401" horizontal-scroll-proportion="0.11419249"> <folding> <element signature="imports" expanded="true" /> </folding> </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="0.77075815" horizontal-scroll-proportion="0.3882545" selected="true"> <folding> <element signature="imports" expanded="true" /> </folding> </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="0.33393502" horizontal-scroll-proportion="0.14845024" /> </open-files> </component> <component name="ToolWindowManager"> ! <frame x="0" y="0" width="1024" height="738" extended-state="1" /> ! <editor active="false" /> <layout> <window_info id="Ant Build" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.175813" order="3" /> *************** *** 57,61 **** <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" /> ! <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.2987805" order="0" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3993808" order="3" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> --- 57,61 ---- <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" /> ! <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.29815573" order="0" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3993808" order="3" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> *************** *** 271,279 **** </view> <view id="SourcepathPane"> - <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org" /> - <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml" /> </view> <view id="ClasspathPane" /> --- 271,277 ---- Index: readme.txt =================================================================== RCS file: /cvsroot/dbunit/dbunit/readme.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** readme.txt 18 Mar 2002 16:07:11 -0000 1.4 --- readme.txt 1 Mar 2003 16:02:29 -0000 1.5 *************** *** 1,18 **** ! The dbUnit database testing framework ! by Manuel Laflamme ! -------------------------------------------------------------------------------- ! The dbUnit database testing framework is a JUnit extension which sets up your ! database in a known state before executing your tests. This framework uses xml ! datasets (collection of data tables) and performs database operations before ! and after each test. The dbUnit framework supports both the clean insert and ! the refresh strategies. - Something worth noting: dbUnit is using itself in its own test suite! - -------------------------------------------------------------------------------- - Visit the dbUnit project hosted by SourceForge at http://dbunit.sourceforge.net/ --- 1,21 ---- ! The DbUnit database testing framework ! http://www.dbunit.org/ ! --- ! DbUnit is a JUnit extension targeted for database-driven projects that, among ! other things, puts your database into a known state between test runs. This is ! an excellent way to avoid the myriad of problems that can occur when one test ! case corrupts the database and causes subsequent tests to fail or exacerbate ! the damage. ! Main features: ! * Ability to export and import your database (or specified tables) content to ! and from XML datasets. ! * Assert facility to verify that your database content match expected data ! during your tests. ! * Ant integration. |
From: <mla...@us...> - 2003-03-01 16:02:40
|
Update of /cvsroot/dbunit/dbunit/docs In directory sc8-pr-cvs1:/tmp/cvs-serv20944/dbunit/docs Modified Files: howto.html index.html Log Message: Updated product description. Index: howto.html =================================================================== RCS file: /cvsroot/dbunit/dbunit/docs/howto.html,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** howto.html 27 Feb 2003 17:32:41 -0000 1.22 --- howto.html 1 Mar 2003 16:02:31 -0000 1.23 *************** *** 224,232 **** public static void assertEquals(IDataSet expected, IDataSet actual) }</pre> ! This can be used to verify if your database contains the expected data during ! test. In this case, the actual dataset is a database snapshot you want to ! verify against an expected dataset. As its name imply, the expected dataset ! contains the expectation values that usually comes from an XML file or been ! created in memory. <p>The expected dataset must be different from the one you have used to setup your database. Therefore you need two datasets to do that; one to --- 224,232 ---- public static void assertEquals(IDataSet expected, IDataSet actual) }</pre> ! This can be used to verify if your database contains the expected data during ! your tests. In this case, the actual dataset is a database snapshot you ! want to verify against an expected dataset. As its name imply, the expected ! dataset contains the expectation values that usually comes from an XML file ! or have been created in memory. <p>The expected dataset must be different from the one you have used to setup your database. Therefore you need two datasets to do that; one to Index: index.html =================================================================== RCS file: /cvsroot/dbunit/dbunit/docs/index.html,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** index.html 24 Feb 2003 01:40:19 -0000 1.25 --- index.html 1 Mar 2003 16:02:32 -0000 1.26 *************** *** 45,56 **** <td class="body" valign="top"> <!-- #BeginEditable "body" --> <h2>The Dbunit Database Testing Framework</h2> ! <p>The Dbunit database testing framework is a JUnit extension which sets ! up your database in a known state before executing your tests. This framework ! uses xml datasets (collection of data tables) and performs database operations ! before and after each test. The Dbunit framework supports both the clean ! insert and the refresh strategies. <br> ! <br> ! Something worth noting: Dbunit is using itself in its own test suite! ! </p> <a name="intro"> <h2>News</h2> --- 45,61 ---- <td class="body" valign="top"> <!-- #BeginEditable "body" --> <h2>The Dbunit Database Testing Framework</h2> ! <p>DbUnit is a JUnit extension targeted for database-driven projects that, ! among other things, puts your database into a known state between test ! runs. This is an excellent way to avoid the myriad of problems that can ! occur when one test case corrupts the database and causes subsequent tests ! to fail or exacerbate the damage.</p> ! <p>Main features: </p> ! <ul> ! <li>Ability to export and import your database (or specified tables) content ! to and from XML datasets.</li> ! <li>Assert facility to verify that your database content match expected ! data during your tests.</li> ! <li>Ant integration.</li> ! </ul> <a name="intro"> <h2>News</h2> |
From: <mla...@us...> - 2003-03-01 06:51:21
|
Update of /cvsroot/dbunit/dbunit/src/xml In directory sc8-pr-cvs1:/tmp/cvs-serv18146/dbunit/src/xml Modified Files: antTestBuildFile.xml Log Message: 1. Added write() overload with encoding argument. 2. Added tests for ant <classpath> element. Index: antTestBuildFile.xml =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/xml/antTestBuildFile.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** antTestBuildFile.xml 11 Dec 2002 15:56:23 -0000 1.4 --- antTestBuildFile.xml 1 Mar 2003 06:51:18 -0000 1.5 *************** *** 279,282 **** --- 279,306 ---- <delete file="${exportDataSet}"/> </target> + + <target name="test-classpath"> + <dbunit driver="org.gjt.mm.mysql.Driver" + url="jdbc:mysql://localhost:3306/dbunit" + userid="root" + password=""> + <operation type="INSERT" src="${testDataSet}" format="xml"/> + <classpath> + <pathelement location="./lib/mm.mysql-2.0.11-bin.jar"/> + </classpath> + </dbunit> + </target> + + <target name="test-drivernotinclasspath"> + <dbunit driver="org.gjt.mm.mysql.Driver" + url="jdbc:mysql://localhost:3306/dbunit" + userid="root" + password=""> + <operation type="INSERT" src="${testDataSet}" format="xml"/> + <classpath> + <pathelement location="./lib/unknown.jar"/> + </classpath> + </dbunit> + </target> </project> |
From: <mla...@us...> - 2003-03-01 06:51:21
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit/ant In directory sc8-pr-cvs1:/tmp/cvs-serv18146/dbunit/src/test/org/dbunit/ant Modified Files: DbUnitTaskTest.java Log Message: 1. Added write() overload with encoding argument. 2. Added tests for ant <classpath> element. Index: DbUnitTaskTest.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/ant/DbUnitTaskTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DbUnitTaskTest.java 15 Feb 2003 18:57:47 -0000 1.7 --- DbUnitTaskTest.java 1 Mar 2003 06:51:18 -0000 1.8 *************** *** 291,294 **** --- 291,328 ---- } + public void testClasspath() throws Exception + { + String targetName = "test-classpath"; + + try + { + executeTarget(targetName); + fail("Should not be able to connect with invalid url!"); + } + catch (BuildException e) + { + // Verify exception type + assertEquals("nested exception type", SQLException.class, e.getException().getClass()); + } + + } + + public void testDriverNotInClasspath() throws Exception + { + String targetName = "test-drivernotinclasspath"; + + try + { + executeTarget(targetName); + fail("Should not have found driver!"); + } + catch (BuildException e) + { + // Verify exception type + assertEquals("nested exception type", ClassNotFoundException.class, e.getException().getClass()); + } + } + + protected void assertOperationType(String failMessage, String targetName, DatabaseOperation expected) { |
From: <mla...@us...> - 2003-03-01 06:51:21
|
Update of /cvsroot/dbunit/dbunit/src/test/org/apache/tools/ant/taskdefs In directory sc8-pr-cvs1:/tmp/cvs-serv18146/dbunit/src/test/org/apache/tools/ant/taskdefs Modified Files: TaskdefsTest.java Log Message: 1. Added write() overload with encoding argument. 2. Added tests for ant <classpath> element. Index: TaskdefsTest.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/apache/tools/ant/taskdefs/TaskdefsTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TaskdefsTest.java 13 Jun 2002 17:24:58 -0000 1.2 --- TaskdefsTest.java 1 Mar 2003 06:51:17 -0000 1.3 *************** *** 210,213 **** --- 210,214 ---- { executeTarget(taskname); + fail("Should throw BuildException because: " + cause); } catch (org.apache.tools.ant.BuildException ex) *************** *** 219,223 **** return; } - fail("Should throw BuildException because: " + cause); } --- 220,223 ---- |
From: <mla...@us...> - 2003-03-01 06:51:21
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit In directory sc8-pr-cvs1:/tmp/cvs-serv18146/dbunit/src/test/org/dbunit Modified Files: Main.java Log Message: 1. Added write() overload with encoding argument. 2. Added tests for ant <classpath> element. Index: Main.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/Main.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Main.java 24 Feb 2003 02:37:22 -0000 1.26 --- Main.java 1 Mar 2003 06:51:17 -0000 1.27 *************** *** 37,40 **** --- 37,42 ---- import java.util.Date; + import electric.xml.Document; + /** * This class is a scratchpad used to try new features. *************** *** 48,51 **** --- 50,54 ---- { oldMain(); + // testWrite(); // writeXls(); // newSheet(); *************** *** 56,64 **** } private static void oldMain() throws Exception { // System.setProperty("dbunit.name.escapePattern", "\"?\""); ! // IDatabaseConnection connection = ! // DatabaseEnvironment.getInstance().getConnection(); // IDataSet dataSet = new XmlDataSet(new FileReader("dataSetTest.xml")); // DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet); --- 59,76 ---- } + private static void testWrite() throws Exception + { + Writer out = new FileWriter("test.xml"); + + Document document = new Document(); + document.write(out); + out.flush(); + } + private static void oldMain() throws Exception { // System.setProperty("dbunit.name.escapePattern", "\"?\""); ! IDatabaseConnection connection = ! DatabaseEnvironment.getInstance().getConnection(); // IDataSet dataSet = new XmlDataSet(new FileReader("dataSetTest.xml")); // DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet); *************** *** 71,76 **** // // ! // FlatXmlDataSet.write(connection.createDataSet(), ! // new FileOutputStream("test.xml")); // //////////////////////////////// --- 83,92 ---- // // ! Writer out = new FileWriter("test.xml"); ! // FlatXmlDataSet.write(connection.createDataSet(), out, "ISO-8859-1"); ! FlatXmlDataSet.write(connection.createDataSet(), out); ! // out.flush(); ! // out.close(); ! // //////////////////////////////// |
From: <mla...@us...> - 2003-03-01 06:51:21
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/xml In directory sc8-pr-cvs1:/tmp/cvs-serv18146/dbunit/src/java/org/dbunit/dataset/xml Modified Files: FlatDtdDataSet.java FlatXmlDataSet.java XmlDataSet.java Log Message: 1. Added write() overload with encoding argument. 2. Added tests for ant <classpath> element. Index: FlatDtdDataSet.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/xml/FlatDtdDataSet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FlatDtdDataSet.java 14 Feb 2003 03:21:59 -0000 1.5 --- FlatDtdDataSet.java 1 Mar 2003 06:51:17 -0000 1.6 *************** *** 129,132 **** --- 129,134 ---- printOut.println(); } + + printOut.flush(); } Index: FlatXmlDataSet.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** FlatXmlDataSet.java 14 Feb 2003 03:21:59 -0000 1.18 --- FlatXmlDataSet.java 1 Mar 2003 06:51:17 -0000 1.19 *************** *** 42,45 **** --- 42,46 ---- { private static final String SYSTEM = "SYSTEM '"; + private static final String DEFAULT_ENCODING = "UTF-8"; private final ITable[] _tables; *************** *** 240,247 **** throws IOException, DataSetException { ! Document document = buildDocument(dataSet); // write xml document document.write(out); } --- 241,249 ---- throws IOException, DataSetException { ! Document document = buildDocument(dataSet, DEFAULT_ENCODING); // write xml document document.write(out); + out.flush(); } *************** *** 252,259 **** throws IOException, DataSetException { ! Document document = buildDocument(dataSet); // write xml document document.write(out); } --- 254,275 ---- throws IOException, DataSetException { ! Document document = buildDocument(dataSet, DEFAULT_ENCODING); ! ! // write xml document ! document.write(out); ! out.flush(); ! } ! ! /** ! * Write the specified dataset to the specified writer as xml. ! */ ! public static void write(IDataSet dataSet, Writer out, String encoding) ! throws IOException, DataSetException ! { ! Document document = buildDocument(dataSet, encoding); // write xml document document.write(out); + out.flush(); } *************** *** 268,276 **** } ! private static Document buildDocument(IDataSet dataSet) throws DataSetException { - Document document = new Document(); ITable[] tables = dataSet.getTables(); ! // String[] tableNames = dataSet.getTableNames(); // dataset --- 284,294 ---- } ! private static Document buildDocument(IDataSet dataSet, String encoding) ! throws DataSetException { ITable[] tables = dataSet.getTables(); ! ! Document document = new Document(); ! document.addChild(new XMLDecl("1.0", encoding)); // dataset Index: XmlDataSet.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/xml/XmlDataSet.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** XmlDataSet.java 14 Feb 2003 03:21:59 -0000 1.13 --- XmlDataSet.java 1 Mar 2003 06:51:17 -0000 1.14 *************** *** 42,45 **** --- 42,46 ---- public class XmlDataSet extends AbstractDataSet { + private static final String DEFAULT_ENCODING = "UTF-8"; private final ITable[] _tables; *************** *** 110,117 **** throws IOException, DataSetException { ! Document document = buildDocument(dataSet); // write xml document document.write(out); } --- 111,119 ---- throws IOException, DataSetException { ! Document document = buildDocument(dataSet, DEFAULT_ENCODING); // write xml document document.write(out); + out.flush(); } *************** *** 122,135 **** throws IOException, DataSetException { ! Document document = buildDocument(dataSet); // write xml document document.write(out); } ! private static Document buildDocument(IDataSet dataSet) throws DataSetException { - Document document = new Document(); ITable[] tables = dataSet.getTables(); // dataset --- 124,154 ---- throws IOException, DataSetException { ! Document document = buildDocument(dataSet, DEFAULT_ENCODING); // write xml document document.write(out); + out.flush(); } ! /** ! * Write the specified dataset to the specified writer as xml. ! */ ! public static void write(IDataSet dataSet, Writer out, String encoding) ! throws IOException, DataSetException ! { ! Document document = buildDocument(dataSet, encoding); ! ! // write xml document ! document.write(out); ! out.flush(); ! } ! ! private static Document buildDocument(IDataSet dataSet, String encoding) ! throws DataSetException { ITable[] tables = dataSet.getTables(); + + Document document = new Document(); + document.addChild(new XMLDecl("1.0", encoding)); // dataset |
From: <mla...@us...> - 2003-03-01 06:51:20
|
Update of /cvsroot/dbunit/dbunit In directory sc8-pr-cvs1:/tmp/cvs-serv18146/dbunit Modified Files: dbunit.ipr dbunit.iws Log Message: 1. Added write() overload with encoding argument. 2. Added tests for ant <classpath> element. Index: dbunit.ipr =================================================================== RCS file: /cvsroot/dbunit/dbunit/dbunit.ipr,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** dbunit.ipr 14 Feb 2003 03:21:58 -0000 1.52 --- dbunit.ipr 1 Mar 2003 06:51:17 -0000 1.53 *************** *** 1,6 **** <?xml version="1.0" encoding="UTF-8"?> ! <project version="3" relativePaths="false"> <component name="ProjectRootManager" version="2"> ! <jdk name="java version "1.3.1_03"" /> <projectPath> <root type="composite"> --- 1,6 ---- <?xml version="1.0" encoding="UTF-8"?> ! <project version="3" relativePaths="true"> <component name="ProjectRootManager" version="2"> ! <jdk name="java version "1.3.1_07"" /> <projectPath> <root type="composite"> *************** *** 10,33 **** <sourcePath> <root type="composite"> ! <root type="jdk" rootType="sourcePath" name="java version "1.3.1_03"" /> <root type="simple" url="file://$PROJECT_DIR$/src/java" /> <root type="simple" url="file://$PROJECT_DIR$/src/test" /> </root> </sourcePath> <classPath> <root type="composite"> ! <root type="jdk" rootType="classPath" name="java version "1.3.1_03"" /> <root type="output" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/dtdparser.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/exml.jar!/" /> - <root type="simple" url="jar://$PROJECT_DIR$/lib/hsqldb.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/junit.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/j2ee.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/mockobjects.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/oracle-jdbc.jar!/" /> - <root type="simple" url="jar://$PROJECT_DIR$/lib/mm.mysql-2.0.11-bin.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/ant.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/crimson.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/jaxp.jar!/" /> </root> </classPath> --- 10,33 ---- <sourcePath> <root type="composite"> ! <root type="jdk" rootType="sourcePath" name="java version "1.3.1_07"" /> <root type="simple" url="file://$PROJECT_DIR$/src/java" /> <root type="simple" url="file://$PROJECT_DIR$/src/test" /> + <root type="simple" url="file://C:/projects/jakarta-poi-1.8.0/src/java" /> </root> </sourcePath> <classPath> <root type="composite"> ! <root type="jdk" rootType="classPath" name="java version "1.3.1_07"" /> <root type="output" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/dtdparser.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/exml.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/junit.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/j2ee.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/mockobjects.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/oracle-jdbc.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/ant.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/crimson.jar!/" /> <root type="simple" url="jar://$PROJECT_DIR$/lib/jaxp.jar!/" /> + <root type="simple" url="jar://$PROJECT_DIR$/lib/hsqldb.jar!/" /> </root> </classPath> *************** *** 40,44 **** <javadocPath> <root type="composite"> ! <root type="jdk" rootType="javadocPath" name="java version "1.3.1_03"" /> </root> </javadocPath> --- 40,44 ---- <javadocPath> <root type="composite"> ! <root type="jdk" rootType="javadocPath" name="java version "1.3.1_07"" /> </root> </javadocPath> *************** *** 51,54 **** --- 51,57 ---- <option name="DEFAULT_OUTPUT_PATH" value="$PROJECT_DIR$/build/classes" /> <option name="OUTPUT_MODE" value="single" /> + <excludeFromCompile> + <directory url="file://C:/projects/jakarta-poi-1.8.0" includeSubdirectories="true" /> + </excludeFromCompile> <resourceExtensions /> </component> *************** *** 88,92 **** <filter targetName="jar" isVisible="false" /> <filter targetName="javadoc" isVisible="false" /> ! <filter targetName="test" isVisible="true" /> <filter targetName="dist" isVisible="false" /> </targetFilters> --- 91,95 ---- <filter targetName="jar" isVisible="false" /> <filter targetName="javadoc" isVisible="false" /> ! <filter targetName="test" isVisible="false" /> <filter targetName="dist" isVisible="false" /> </targetFilters> Index: dbunit.iws =================================================================== RCS file: /cvsroot/dbunit/dbunit/dbunit.iws,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dbunit.iws 14 Feb 2003 05:12:29 -0000 1.3 --- dbunit.iws 1 Mar 2003 06:51:17 -0000 1.4 *************** *** 1,4 **** <?xml version="1.0" encoding="UTF-8"?> ! <project version="3" relativePaths="false"> <component name="WebReferencesConfigurable"> <property name="CUSTOM_MAP_LOOKUP" type="list" /> --- 1,4 ---- <?xml version="1.0" encoding="UTF-8"?> ! <project version="3" relativePaths="true"> <component name="WebReferencesConfigurable"> <property name="CUSTOM_MAP_LOOKUP" type="list" /> *************** *** 12,58 **** <component name="FileEditorManager"> <history> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/operation/InsertOperationTest.java" line="266" column="34" vertical-scroll-proportion="0.3580247" horizontal-scroll-proportion="0.36785161" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/operation/AbstractBatchOperationTest.java" line="46" column="34" vertical-scroll-proportion="0.3580247" horizontal-scroll-proportion="0.36785161" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/util/Base64.java" line="548" column="51" vertical-scroll-proportion="0.33333334" horizontal-scroll-proportion="0.5517774" /> ! <source-position-entry url="file://$PROJECT_DIR$/build.xml" line="70" column="0" vertical-scroll-proportion="4.1463413" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/database/statement/MockBatchStatement.java" line="32" column="13" vertical-scroll-proportion="0.65313655" horizontal-scroll-proportion="0.13663663" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/FileAsserts.java" line="15" column="63" vertical-scroll-proportion="0.4704797" horizontal-scroll-proportion="0.71359223" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/dataset/xml/FlatDtdDataSetTest.java" line="107" column="12" vertical-scroll-proportion="0.30960855" horizontal-scroll-proportion="0.13592233"> <folding> <element signature="imports" expanded="true" /> </folding> </source-position-entry> - <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlTable.java" line="58" column="60" vertical-scroll-proportion="0.9341637" horizontal-scroll-proportion="0.63106793" /> - <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/NoSuchColumnException.java" line="35" column="18" vertical-scroll-proportion="0.46494466" horizontal-scroll-proportion="0.20192307" /> - <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="40" column="22" vertical-scroll-proportion="0.90774906" horizontal-scroll-proportion="0.23557693" /> - <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/NoPrimaryKeyException.java" line="29" column="13" vertical-scroll-proportion="0.3321033" horizontal-scroll-proportion="0.14583333" /> - <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/NoColumnsFoundException.java" line="1" column="39" vertical-scroll-proportion="-0.6800766" horizontal-scroll-proportion="0.4375" /> - <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/database/DatabaseTableMetaData.java" line="182" column="46" vertical-scroll-proportion="2.2398524" horizontal-scroll-proportion="0.51602566" /> - <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/database/DatabaseTableMetaDataTest.java" line="117" column="23" vertical-scroll-proportion="0.41143912" horizontal-scroll-proportion="0.25801283" /> - <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/datatype/UnknownDataType.java" line="29" column="17" vertical-scroll-proportion="0.9095941" horizontal-scroll-proportion="0.19070514" /> </history> <open-files> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="40" column="22" vertical-scroll-proportion="0.90774906" horizontal-scroll-proportion="0.23557693" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/database/DatabaseTableMetaData.java" line="182" column="46" vertical-scroll-proportion="2.2398524" horizontal-scroll-proportion="0.51602566" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/database/DatabaseTableMetaDataTest.java" line="117" column="23" vertical-scroll-proportion="0.41143912" horizontal-scroll-proportion="0.25801283" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/datatype/UnknownDataType.java" line="29" column="17" vertical-scroll-proportion="0.9095941" horizontal-scroll-proportion="0.19070514" selected="true" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/NoPrimaryKeyException.java" line="29" column="13" vertical-scroll-proportion="0.3321033" horizontal-scroll-proportion="0.14583333" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/NoSuchColumnException.java" line="35" column="18" vertical-scroll-proportion="0.46494466" horizontal-scroll-proportion="0.20192307" /> </open-files> </component> <component name="ToolWindowManager"> <frame x="-4" y="-4" width="1032" height="746" extended-state="0" /> ! <editor active="false" /> <layout> ! <window_info id="Ant Build" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="3" /> ! <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.39935064" order="2" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" /> ! <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.29268292" order="0" /> ! <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.39935064" order="3" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> ! <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.41233766" order="1" /> ! <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.40584415" order="8" x="20" y="232" width="984" height="274" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="6" /> <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" /> --- 12,65 ---- <component name="FileEditorManager"> <history> ! <source-position-entry url="file://$PROJECT_DIR$/profile.properties" line="37" column="30" vertical-scroll-proportion="0.35640138" horizontal-scroll-proportion="0.34146342" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/ant/DbUnitTaskTest.java" line="303" column="0" vertical-scroll-proportion="0.25373134" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/xml/antTestBuildFile.xml" line="293" column="41" vertical-scroll-proportion="0.5018657" horizontal-scroll-proportion="0.46666667" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/ant/DbUnitTask.java" line="278" column="58" vertical-scroll-proportion="0.5242537" horizontal-scroll-proportion="0.6601626" /> ! <source-position-entry url="jar://$PROJECT_DIR$/lib/ant.jar!/org/apache/tools/ant/BuildException.class" line="38" column="11" vertical-scroll-proportion="0.92350745" horizontal-scroll-proportion="0.12520325" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatDtdDataSet.java" line="131" column="25" vertical-scroll-proportion="0.116094984" horizontal-scroll-proportion="0.28455284" /> ! <source-position-entry url="jar://C:/java/jdk1.3.1_07/src.jar!/src/java/io/OutputStreamWriter.java" line="112" column="18" vertical-scroll-proportion="0.3324468" horizontal-scroll-proportion="0.20487805" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/xml/caseInsensitiveTableTest.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/xml/compositeDataSetDuplicateTest2.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/xml/caseInsensitiveDataSetDuplicateTest.xml" line="0" column="0" vertical-scroll-proportion="0.0" horizontal-scroll-proportion="0.0" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.13167259" horizontal-scroll-proportion="0.11326861"> ! <folding> ! <element signature="imports" expanded="true" /> ! </folding> ! </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="0.3291815" horizontal-scroll-proportion="0.14724919" /> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="0.7597865" horizontal-scroll-proportion="0.38511327"> <folding> <element signature="imports" expanded="true" /> </folding> </source-position-entry> </history> <open-files> ! <source-position-entry url="file://$PROJECT_DIR$/src/test/org/dbunit/Main.java" line="49" column="10" vertical-scroll-proportion="-0.13167259" horizontal-scroll-proportion="0.11326861"> ! <folding> ! <element signature="imports" expanded="true" /> ! </folding> ! </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/FlatXmlDataSet.java" line="232" column="34" vertical-scroll-proportion="0.7597865" horizontal-scroll-proportion="0.38511327" selected="true"> ! <folding> ! <element signature="imports" expanded="true" /> ! </folding> ! </source-position-entry> ! <source-position-entry url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml/XmlDataSet.java" line="162" column="13" vertical-scroll-proportion="0.3291815" horizontal-scroll-proportion="0.14724919" /> </open-files> </component> <component name="ToolWindowManager"> <frame x="-4" y="-4" width="1032" height="746" extended-state="0" /> ! <editor active="true" /> <layout> ! <window_info id="Ant Build" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.175813" order="3" /> ! <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.38311687" order="2" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" /> ! <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.2987805" order="0" /> ! <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3993808" order="3" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> ! <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.48701298" order="1" /> ! <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3961039" order="8" x="20" y="232" width="984" height="274" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="6" /> <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" /> *************** *** 259,272 **** <navigator currentView="SourcepathPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" /> <view id="ProjectPane"> <expanded_node type="directory" url="file://$PROJECT_DIR$" /> </view> <view id="SourcepathPane"> ! <expanded_node type="directory" url="file://$PROJECT_DIR$/src/test" /> ! <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit" /> ! <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit/database" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java" /> ! <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/datatype" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org" /> ! <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset" /> </view> <view id="ClasspathPane" /> --- 266,279 ---- <navigator currentView="SourcepathPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" /> <view id="ProjectPane"> + <expanded_node type="directory" url="file://$PROJECT_DIR$/src" /> + <expanded_node type="directory" url="file://$PROJECT_DIR$/src/xml" /> <expanded_node type="directory" url="file://$PROJECT_DIR$" /> </view> <view id="SourcepathPane"> ! <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java" /> ! <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit" /> <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org" /> ! <expanded_node type="directory" url="file://$PROJECT_DIR$/src/java/org/dbunit/dataset/xml" /> </view> <view id="ClasspathPane" /> *************** *** 331,343 **** <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> </configuration> - <configuration name="AllTests" type="JUnit" default="false" selected="false"> - <option name="PACKAGE_NAME" /> - <option name="MAIN_CLASS_NAME" value="org.dbunit.AllTests" /> - <option name="METHOD_NAME" /> - <option name="TEST_OBJECT" value="class" /> - <option name="VM_PARAMETERS" /> - <option name="PARAMETERS" /> - <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - </configuration> <configuration name="AllTests" type="Application" default="false" selected="true"> <option name="MAIN_CLASS_NAME" value="org.dbunit.AllTests" /> --- 338,341 ---- *************** *** 346,405 **** <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> </configuration> - <configuration name="FlatXmlDataSetTest" type="JUnit" default="false" selected="false"> - <option name="PACKAGE_NAME" /> - <option name="MAIN_CLASS_NAME" value="org.dbunit.dataset.xml.FlatXmlDataSetTest" /> - <option name="METHOD_NAME" /> - <option name="TEST_OBJECT" value="class" /> - <option name="VM_PARAMETERS" /> - <option name="PARAMETERS" /> - <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - </configuration> - <configuration name="FlatDtdDataSetTest.testWriteFromDatabase" type="JUnit" default="false" selected="false"> - <option name="PACKAGE_NAME" /> - <option name="MAIN_CLASS_NAME" value="org.dbunit.dataset.xml.FlatDtdDataSetTest" /> - <option name="METHOD_NAME" value="testWriteFromDatabase" /> - <option name="TEST_OBJECT" value="method" /> - <option name="VM_PARAMETERS" /> - <option name="PARAMETERS" /> - <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - </configuration> - <configuration name="DatabaseTableMetaDataTest.testGetNoColumns" type="JUnit" default="false" selected="false"> - <option name="PACKAGE_NAME" /> - <option name="MAIN_CLASS_NAME" value="org.dbunit.database.DatabaseTableMetaDataTest" /> - <option name="METHOD_NAME" value="testGetNoColumns" /> - <option name="TEST_OBJECT" value="method" /> - <option name="VM_PARAMETERS" /> - <option name="PARAMETERS" /> - <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - </configuration> - <configuration name="DatabaseTableMetaDataTest.testGetNoPrimaryKeys" type="JUnit" default="false" selected="false"> - <option name="PACKAGE_NAME" /> - <option name="MAIN_CLASS_NAME" value="org.dbunit.database.DatabaseTableMetaDataTest" /> - <option name="METHOD_NAME" value="testGetNoPrimaryKeys" /> - <option name="TEST_OBJECT" value="method" /> - <option name="VM_PARAMETERS" /> - <option name="PARAMETERS" /> - <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - </configuration> - <configuration name="DatabaseTableMetaDataTest.testGetPrimaryKeys" type="JUnit" default="false" selected="false"> - <option name="PACKAGE_NAME" /> - <option name="MAIN_CLASS_NAME" value="org.dbunit.database.DatabaseTableMetaDataTest" /> - <option name="METHOD_NAME" value="testGetPrimaryKeys" /> - <option name="TEST_OBJECT" value="method" /> - <option name="VM_PARAMETERS" /> - <option name="PARAMETERS" /> - <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - </configuration> - <configuration name="DatabaseTableMetaDataTest" type="JUnit" default="false" selected="false"> - <option name="PACKAGE_NAME" /> - <option name="MAIN_CLASS_NAME" value="org.dbunit.database.DatabaseTableMetaDataTest" /> - <option name="METHOD_NAME" /> - <option name="TEST_OBJECT" value="class" /> - <option name="VM_PARAMETERS" /> - <option name="PARAMETERS" /> - <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> - </configuration> </component> ! <component name="BookmarkManager" /> <component name="Commander"> <leftPanel view="Project" url="file://$PROJECT_DIR$/src/java/org/dbunit" /> --- 344,351 ---- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> </configuration> </component> ! <component name="BookmarkManager"> ! <editor_bookmark url="file://$PROJECT_DIR$/src/test/org/dbunit/ant/DbUnitTaskTest.java" line="293" /> ! </component> <component name="Commander"> <leftPanel view="Project" url="file://$PROJECT_DIR$/src/java/org/dbunit" /> |