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-01 06:51:20
|
Update of /cvsroot/dbunit/dbunit/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv18146/dbunit/docs
Modified Files:
anttask.html
Log Message:
1. Added write() overload with encoding argument.
2. Added tests for ant <classpath> element.
Index: anttask.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/anttask.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** anttask.html 24 Feb 2003 01:40:18 -0000 1.5
--- anttask.html 1 Mar 2003 06:51:17 -0000 1.6
***************
*** 279,283 ****
<h3>Examples</h3>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password="">
! <classpath><br> <pathelement location="/some/jdbc.jar"><br> </classpath><br> <operation type="UPDATE" src="updateFile.xml"/><br> </dbunit></pre>
<p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver,
searching it from /some/jdbc.jar as well from the system classpath, and
--- 279,283 ----
<h3>Examples</h3>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password="">
! <classpath><br> <pathelement location="/some/jdbc.jar"/><br> </classpath><br> <operation type="UPDATE" src="updateFile.xml"/><br> </dbunit></pre>
<p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver,
searching it from /some/jdbc.jar as well from the system classpath, and
|
|
From: <mla...@us...> - 2003-03-01 06:51:20
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/ant
In directory sc8-pr-cvs1:/tmp/cvs-serv18146/dbunit/src/java/org/dbunit/ant
Modified Files:
DbUnitTask.java
Log Message:
1. Added write() overload with encoding argument.
2. Added tests for ant <classpath> element.
Index: DbUnitTask.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/ant/DbUnitTask.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DbUnitTask.java 16 Feb 2003 17:41:14 -0000 1.4
--- DbUnitTask.java 1 Mar 2003 06:51:17 -0000 1.5
***************
*** 277,281 ****
{
throw new BuildException("Class Not Found: JDBC driver "
! + driver + " could not be loaded", location);
}
catch (IllegalAccessException e)
--- 277,281 ----
{
throw new BuildException("Class Not Found: JDBC driver "
! + driver + " could not be loaded", e, location);
}
catch (IllegalAccessException e)
|
|
From: <de...@us...> - 2003-02-27 17:32:45
|
Update of /cvsroot/dbunit/dbunit/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv24412a
Modified Files:
howto.html
Log Message:
Fixing links for canoo integration
Index: howto.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/howto.html,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** howto.html 24 Feb 2003 01:40:19 -0000 1.21
--- howto.html 27 Feb 2003 17:32:41 -0000 1.22
***************
*** 7,15 ****
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - Howto Guides</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
--- 7,15 ----
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - Howto Guides</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
***************
*** 17,24 ****
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
--- 17,24 ----
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
***************
*** 37,81 ****
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2>How-to Guides</h2>
<ul>
<li><a href="#createtest">How to create a test case to setup your database</a></li>
! <li><a href="#noextend">How to setup your database in a test case that
does not extend DatabaseTestCase</a></li>
<li><a href="#extract">How to export a dataset from your database</a></li>
! <li><a href="#generatedtd">How to generate a DTD representing your database
schema</a></li>
! <li><a href="#assertdata">How to verify that your database contains expected
data</a> <font color="#FF0000">(updated)</font></li>
! <li><a href="#multipleschema">How to export data from or import data to
multiple database schemas</a></li>
<li><a href="#canoo">How to Use DbUnit with Canoo WebTest </a> <font color="#FF0000">(new)</font></li>
</ul>
<hr>
! <a name="createtest">
<h2>How to create a test case to setup your database</h2>
</a> To write a test case, please follow the steps described below.<br>
<br>
<h4>Step 1: Create your dataset file</h4>
! Your test will obviously need some data to work with. This means you must
! create a dataset. In most situations you will work with xml datasets. You
! can manually create an xml dataset from scratch or create one by exporting
some data from your database (see <a href="#extract">how-to export</a>).<br>
<br>
<h4>Step 2: Extend the DatabaseTestCase class</h4>
! Now you need to create a test class. The easiest way to use Dbunit is to
! make your test class extend the DatabaseTestCase class. DatabaseTestCase
! extends the JUnit TestCase class. Two template methods are required to be
! implemented: <a class="code">getConnection()</a> to return a connection
! to your database and <a class="code">getDataSet()</a> to return the dataset
you created in step 1.<br>
<br>
! Following is a sample implementation that returns a connection to a Hypersonic
database and an xml dataset:<br>
<pre>
--- 37,81 ----
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2>How-to Guides</h2>
<ul>
<li><a href="#createtest">How to create a test case to setup your database</a></li>
! <li><a href="#noextend">How to setup your database in a test case that
does not extend DatabaseTestCase</a></li>
<li><a href="#extract">How to export a dataset from your database</a></li>
! <li><a href="#generatedtd">How to generate a DTD representing your database
schema</a></li>
! <li><a href="#assertdata">How to verify that your database contains expected
data</a> <font color="#FF0000">(updated)</font></li>
! <li><a href="#multipleschema">How to export data from or import data to
multiple database schemas</a></li>
<li><a href="#canoo">How to Use DbUnit with Canoo WebTest </a> <font color="#FF0000">(new)</font></li>
</ul>
<hr>
! <a name="createtest">
<h2>How to create a test case to setup your database</h2>
</a> To write a test case, please follow the steps described below.<br>
<br>
<h4>Step 1: Create your dataset file</h4>
! Your test will obviously need some data to work with. This means you must
! create a dataset. In most situations you will work with xml datasets. You
! can manually create an xml dataset from scratch or create one by exporting
some data from your database (see <a href="#extract">how-to export</a>).<br>
<br>
<h4>Step 2: Extend the DatabaseTestCase class</h4>
! Now you need to create a test class. The easiest way to use Dbunit is to
! make your test class extend the DatabaseTestCase class. DatabaseTestCase
! extends the JUnit TestCase class. Two template methods are required to be
! implemented: <a class="code">getConnection()</a> to return a connection
! to your database and <a class="code">getDataSet()</a> to return the dataset
you created in step 1.<br>
<br>
! Following is a sample implementation that returns a connection to a Hypersonic
database and an xml dataset:<br>
<pre>
***************
*** 101,111 ****
}</pre>
<br>
! <h4>Step 3: (Optional) Implement getSetUpOperation() and getTearDownOperation()
methods</h4>
! <p>By default, Dbunit performs a <a href="components.html#cleanInsert">CLEAN_INSERT</a>
! operation before executing each test and performs no cleanup operation
! afterward. You can modify this behavior by overriding <a class="code">getSetUpOperation()</a>
and <a class="code">getTearDownOperation()</a>.</p>
! <p>The following example demonstrates how you can easily override the operation
executed before or after your test.<br>
</p>
--- 101,111 ----
}</pre>
<br>
! <h4>Step 3: (Optional) Implement getSetUpOperation() and getTearDownOperation()
methods</h4>
! <p>By default, Dbunit performs a <a href="components.html#cleanInsert">CLEAN_INSERT</a>
! operation before executing each test and performs no cleanup operation
! afterward. You can modify this behavior by overriding <a class="code">getSetUpOperation()</a>
and <a class="code">getTearDownOperation()</a>.</p>
! <p>The following example demonstrates how you can easily override the operation
executed before or after your test.<br>
</p>
***************
*** 126,138 ****
}</pre>
<h4>Step 4: Implement your testXXX() methods</h4>
! Implement your test methods as you normally would with JUnit. Your database
! is now initialized before and cleaned-up after each test methods according
to what you did in previous steps.<br>
<br>
! <a name="noextend">
<h2>How to setup your database in a test case that does not extend DatabaseTestCase</h2>
! </a> In order to use Dbunit you are not required to extend the DatabaseTestCase
! class. Simply override the standard JUnit setUp() method and execute the
! desired operation on your database. Do something similar in teardown() if
you need to perform any clean-up.<br>
<br>
--- 126,138 ----
}</pre>
<h4>Step 4: Implement your testXXX() methods</h4>
! Implement your test methods as you normally would with JUnit. Your database
! is now initialized before and cleaned-up after each test methods according
to what you did in previous steps.<br>
<br>
! <a name="noextend">
<h2>How to setup your database in a test case that does not extend DatabaseTestCase</h2>
! </a> In order to use Dbunit you are not required to extend the DatabaseTestCase
! class. Simply override the standard JUnit setUp() method and execute the
! desired operation on your database. Do something similar in teardown() if
you need to perform any clean-up.<br>
<br>
***************
*** 169,177 ****
...
}</pre>
! <a name="extract">
<h2>How to export a dataset from your database</h2>
! </a> Since version 1.2, the <a href="components.html#FlatXmlDataSet">flat
! XML dataset</a> format is the prefered way to persist a dataset in XML.
! The following sample demonstrates how you can export one or many tables
from a database to an flat XML dataset file.<br>
<pre>
--- 169,177 ----
...
}</pre>
! <a name="extract">
<h2>How to export a dataset from your database</h2>
! </a> Since version 1.2, the <a href="components.html#FlatXmlDataSet">flat
! XML dataset</a> format is the prefered way to persist a dataset in XML.
! The following sample demonstrates how you can export one or many tables
from a database to an flat XML dataset file.<br>
<pre>
***************
*** 196,203 ****
}
}</pre>
! <a name="generatedtd">
<h2>How to generate a DTD representing your database schema</h2>
! </a>
! <p>The following sample demonstrates how you can generate a flat xml dataset
DTD from a database.</p>
<pre>
--- 196,203 ----
}
}</pre>
! <a name="generatedtd">
<h2>How to generate a DTD representing your database schema</h2>
! </a>
! <p>The following sample demonstrates how you can generate a flat xml dataset
DTD from a database.</p>
<pre>
***************
*** 215,221 ****
FlatDtdDataSet.write(connection.createDataSet(),<br> new FileOutputStream("test.dtd"));<br> }
}</pre>
! <a name="assertdata">
<h2>How to verify that your database contains expected data</h2>
! </a> Dbunit provides support for verifying whether two tables or datasets
contain identical data. <br>
<pre>public class Assertion
--- 215,221 ----
FlatDtdDataSet.write(connection.createDataSet(),<br> new FileOutputStream("test.dtd"));<br> }
}</pre>
! <a name="assertdata">
<h2>How to verify that your database contains expected data</h2>
! </a> Dbunit provides support for verifying whether two tables or datasets
contain identical data. <br>
<pre>public class Assertion
***************
*** 224,237 ****
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
! setup your database before a test and another to provide the expected
data during the test.</p>
! <p>The following example, show how to compare a database table snapshot
against a flat XML table:<br>
</p>
--- 224,237 ----
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
! setup your database before a test and another to provide the expected
data during the test.</p>
! <p>The following example, show how to compare a database table snapshot
against a flat XML table:<br>
</p>
***************
*** 265,305 ****
}</pre>
<h3>Verifying the result of a database query </h3>
! <p>You can also verify if the result of a query match an expected set of
! data. The query can be used to select only a subset of a table or even
join multiple tables together like this:</p>
! <p>
! <pre> ITable actualJoinData = getConnection().createQueryTable("RESULT_NAME",
"SELECT * FROM TABLE1, TABLE2 WHERE ..."); </pre>
<h3>Ignoring some columns </h3>
! <p>The following code snippet shows you how to ignore some columns in the
! comparison. To works, the actual table MUST contain at least ALL the columns
! from the expected table. Extra columns can exist in the actual table but
! not in the expected one.
! <p>
! <pre> Assertion.assertEquals(expected,
new CompositeTable(expected.getTableMetaData(), actual)); </pre>
<h3>Row ordering</h3>
! <p>By default, database table snapshot taken by DbUnit are sorted by primary
! keys. If a table does not have a primary key or the primary key is automatically
! generated by your database, the rows ordering is not predictable and <code>assertEquals</code>
will fail.</p>
! <p>You must order your database snapshot manually by using <code>IDatabaseConnection.createQueryTable</code>
! with an "ORDER BY" clause. Or you can use the <code>SortedTable</code>
decorator class like this:</p>
! <p>
! <pre> Assertion.assertEquals(new SortedTable(expected),
new SortedTable(actual, expected.getTableMetaData()));</pre>
! <a name="multipleschema">
<h2>How to export data from or import data to multiple database schemas</h2>
! </a> Dbunit support multiple schemas per connection since version 1.2.3.
! To enable multiple schemas support, set the following system property before
! the creation of your database connection.
<pre>
System.setProperty("dbunit.qualified.table.names", "true");</pre>
! <p>This tells to Dbunit to work with table names qualified by their schema
! name. If this mode is enabled, all table names are assumed to have this
format: SCHEMA_NAME.TABLE_NAME. <br>
</p>
! <p>Example of flat xml dataset exported or imported when qualified table
names mode is enabled:</p>
<pre><dataset>
--- 265,305 ----
}</pre>
<h3>Verifying the result of a database query </h3>
! <p>You can also verify if the result of a query match an expected set of
! data. The query can be used to select only a subset of a table or even
join multiple tables together like this:</p>
! <p>
! <pre> ITable actualJoinData = getConnection().createQueryTable("RESULT_NAME",
"SELECT * FROM TABLE1, TABLE2 WHERE ..."); </pre>
<h3>Ignoring some columns </h3>
! <p>The following code snippet shows you how to ignore some columns in the
! comparison. To works, the actual table MUST contain at least ALL the columns
! from the expected table. Extra columns can exist in the actual table but
! not in the expected one.
! <p>
! <pre> Assertion.assertEquals(expected,
new CompositeTable(expected.getTableMetaData(), actual)); </pre>
<h3>Row ordering</h3>
! <p>By default, database table snapshot taken by DbUnit are sorted by primary
! keys. If a table does not have a primary key or the primary key is automatically
! generated by your database, the rows ordering is not predictable and <code>assertEquals</code>
will fail.</p>
! <p>You must order your database snapshot manually by using <code>IDatabaseConnection.createQueryTable</code>
! with an "ORDER BY" clause. Or you can use the <code>SortedTable</code>
decorator class like this:</p>
! <p>
! <pre> Assertion.assertEquals(new SortedTable(expected),
new SortedTable(actual, expected.getTableMetaData()));</pre>
! <a name="multipleschema">
<h2>How to export data from or import data to multiple database schemas</h2>
! </a> Dbunit support multiple schemas per connection since version 1.2.3.
! To enable multiple schemas support, set the following system property before
! the creation of your database connection.
<pre>
System.setProperty("dbunit.qualified.table.names", "true");</pre>
! <p>This tells to Dbunit to work with table names qualified by their schema
! name. If this mode is enabled, all table names are assumed to have this
format: SCHEMA_NAME.TABLE_NAME. <br>
</p>
! <p>Example of flat xml dataset exported or imported when qualified table
names mode is enabled:</p>
<pre><dataset>
***************
*** 308,341 ****
<SCHEMA2.TABLE2 COLUMN0="row 0 col 0" COLUMN1="row 0 col 1" COLUMN2="row 0 col 2"/>
</dataset></pre>
! <a name="canoo">
<h2>How to Use DbUnit with Canoo WebTest</h2>
! </a>
<p>By Eric Pugh</p>
! <p>With Dbunit 1.4's new Ant tasks, Dbunit makes it much easier to run WebTest
! scripts for database centric applications. <a href="http://webtest.canoo.com">WebTest</a>
! is a tool to simulate a user's browser clicking through the pages on a
! web site. It allows you to create a series of Ant based tests for your
! website. In fact, this can be used to perform User Acceptance tests for
! websites built using non Java technologies like ColdFusion or ASP! This
howto walks you through a suggested format for storing tests. <br>
</p>
<h4>Step 1: Create your dataset file</h4>
! Your first step is to create your dataset file that you wan to load into
! your database before running your WebTest script. Use one of the various
! methods described above. Put the various datasets you need in a <code>/data</code>
! directory.
<h4>Step 2: Create your Ant build.xml file</h4>
! A suggested setup is to have a single build.xml file that is the entry point
! for all your tests. This would include a couple targets like:
<ol>
! <li> <code>test</code>: Runs all the testSuites that you have created
! <li> <code>test:single</code>: Runs a single test in a specific testSuite
! <li> <code>test:suite</code>: Runs all the tests for a specific testSuite
</ol>
<h4>Step 3: Create your various Test Suites</h4>
! Once you have your build.xml file set up, you can now call the various TestSuites.
! Create a separate TestSuiteXXX.xml for the various modules that you would
! like to test. In your TestSuiteXXX.xml, you should have your default target
! testSuite call all the testcases you have definied:
<pre>
<target name="testSuite">
--- 308,341 ----
<SCHEMA2.TABLE2 COLUMN0="row 0 col 0" COLUMN1="row 0 col 1" COLUMN2="row 0 col 2"/>
</dataset></pre>
! <a name="canoo">
<h2>How to Use DbUnit with Canoo WebTest</h2>
! </a>
<p>By Eric Pugh</p>
! <p>With Dbunit 1.4's new Ant tasks, Dbunit makes it much easier to run WebTest
! scripts for database centric applications. <a href="http://webtest.canoo.com">WebTest</a>
! is a tool to simulate a user's browser clicking through the pages on a
! web site. It allows you to create a series of Ant based tests for your
! website. In fact, this can be used to perform User Acceptance tests for
! websites built using non Java technologies like ColdFusion or ASP! This
howto walks you through a suggested format for storing tests. <br>
</p>
<h4>Step 1: Create your dataset file</h4>
! Your first step is to create your dataset file that you wan to load into
! your database before running your WebTest script. Use one of the various
! methods described above. Put the various datasets you need in a <code>/data</code>
! directory.
<h4>Step 2: Create your Ant build.xml file</h4>
! A suggested setup is to have a single build.xml file that is the entry point
! for all your tests. This would include a couple targets like:
<ol>
! <li> <code>test</code>: Runs all the testSuites that you have created
! <li> <code>test:single</code>: Runs a single test in a specific testSuite
! <li> <code>test:suite</code>: Runs all the tests for a specific testSuite
</ol>
<h4>Step 3: Create your various Test Suites</h4>
! Once you have your build.xml file set up, you can now call the various TestSuites.
! Create a separate TestSuiteXXX.xml for the various modules that you would
! like to test. In your TestSuiteXXX.xml, you should have your default target
! testSuite call all the testcases you have definied:
<pre>
<target name="testSuite">
***************
*** 351,367 ****
</target>
</pre>
! This way you can either run all the test's in your Test Suite, or just run
a specific one, all from build.xml! <br>
<h4>Step 4: Create your various Tests</h4>
! Now you need to write your various testcases. For more information on WebTest,
! please refer to <a href=http://webtest.canoo.com>the WebTest</a> home page.
! If you have find you are duplicating pieces of XML, then place them in a
! <code>/includes</code> directory. If you have a single set of properties,
! then load them as part of build.xml by specifing them in your build.properties
! file. If you have multiple databases you need to connect to, then declare
! your sql connection properties in a TestSuiteXXX.properties file that you
! load on a per suite basis. In this example, we are using doing a clean insert
! into the database, and using the MSSQL_CLEAN_INSERT instead of CLEAN_INSERT
! because of the requirement to do identity column inserts.
<pre>
<target name="subscribeEmailAddressWithOptedOutEmail">
--- 351,367 ----
</target>
</pre>
! This way you can either run all the test's in your Test Suite, or just run
a specific one, all from build.xml! <br>
<h4>Step 4: Create your various Tests</h4>
! Now you need to write your various testcases. For more information on WebTest,
! please refer to <a href=http://webtest.canoo.com>the WebTest</a> home page.
! If you have find you are duplicating pieces of XML, then place them in a
! <code>/includes</code> directory. If you have a single set of properties,
! then load them as part of build.xml by specifing them in your build.properties
! file. If you have multiple databases you need to connect to, then declare
! your sql connection properties in a TestSuiteXXX.properties file that you
! load on a per suite basis. In this example, we are using doing a clean insert
! into the database, and using the MSSQL_CLEAN_INSERT instead of CLEAN_INSERT
! because of the requirement to do identity column inserts.
<pre>
<target name="subscribeEmailAddressWithOptedOutEmail">
***************
*** 371,375 ****
userid="${sql.username}"
password="${sql.password}">
! <operation type="MSSQL_CLEAN_INSERT"
src="data/subscribeEmailAddressWithOptedOutEmail.xml"
format="flat"/>
--- 371,375 ----
userid="${sql.username}"
password="${sql.password}">
! <operation type="MSSQL_CLEAN_INSERT"
src="data/subscribeEmailAddressWithOptedOutEmail.xml"
format="flat"/>
***************
*** 390,400 ****
<br>
<h4>Sample Directory Layout</h4>
! When you are done, you will have a series of files that look like this:
<pre>
\root\
<a href="sample_webtest/build.xml">build.xml</a>
<a href="sample_webtest/build.properties">build.properties</a>
! <a href="sample_webtest/TestSuiteEmail.xml">TestSuiteEmail.xml</a>
! <a href="sample_webtest/TestSuiteEmail.properties">TestSuiteEmail.properties</a>
\root\data\
<a href="sample_webtest/subscribeEmailAddressWithOptedOutEmail.xml">subscribeEmailAddressWithOptedOutEmail.xml</a>
--- 390,400 ----
<br>
<h4>Sample Directory Layout</h4>
! When you are done, you will have a series of files that look like this:
<pre>
\root\
<a href="sample_webtest/build.xml">build.xml</a>
<a href="sample_webtest/build.properties">build.properties</a>
! <a href="sample_webtest/TestSuiteEDM.xml">TestSuiteEDM.xml</a>
! <a href="sample_webtest/TestSuiteEDM.properties">TestSuiteEDM.properties</a>
\root\data\
<a href="sample_webtest/subscribeEmailAddressWithOptedOutEmail.xml">subscribeEmailAddressWithOptedOutEmail.xml</a>
***************
*** 402,416 ****
<a href="sample_webtest/sharedConfiguration.xml">sharedConfiguration.xml</a>
</pre>
! <!-- #EndEditable -->
<hr>
! <div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
Reserved</font></p>
! <p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
! - <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
! Task</a> - <a href="howto.html">How-to Guides</a> - <a href="bestpractices.html">Best
! Practices</a> - <a href="properties.html">Properties</a> - <a href="api/index.html">API
! Reference</a> - <a href="faq.html">FAQ</a> - <a href="changes.html">Changes
! History</a> - <a href="download.html">Download</a> - <a href="support.html">Support</a>
- <a href="resources.html">Resources</a></font></p>
<font size="1">$Revision$ $Date$</font> </div>
--- 402,416 ----
<a href="sample_webtest/sharedConfiguration.xml">sharedConfiguration.xml</a>
</pre>
! <!-- #EndEditable -->
<hr>
! <div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
Reserved</font></p>
! <p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
! - <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
! Task</a> - <a href="howto.html">How-to Guides</a> - <a href="bestpractices.html">Best
! Practices</a> - <a href="properties.html">Properties</a> - <a href="api/index.html">API
! Reference</a> - <a href="faq.html">FAQ</a> - <a href="changes.html">Changes
! History</a> - <a href="download.html">Download</a> - <a href="support.html">Support</a>
- <a href="resources.html">Resources</a></font></p>
<font size="1">$Revision$ $Date$</font> </div>
|
|
From: <de...@us...> - 2003-02-27 17:32:16
|
Update of /cvsroot/dbunit/dbunit/docs/sample_webtest
In directory sc8-pr-cvs1:/tmp/cvs-serv23988
Modified Files:
TestSuiteEDM.xml
Added Files:
TestSuiteEDM.properties
Log Message:
Updating samples for canoo integration
--- NEW FILE: TestSuiteEDM.properties ---
web.server=dcapp01
webtest.username=mywebtestuser
webtest.password=mypassword
haltonerror=true
haltonfailure=true
host=${web.server}
port=8080
protocol=http
basepath=/webadmin
showhtmlparseroutput=no
start.page=home.jsp
sql.username =${sql.user}
sql.jdbcdriver = com.microsoft.jdbc.sqlserver.SQLServerDriver
sql.url =jdbc:microsoft:sqlserver://${sql.server}:1433;DatabaseName=${sql.database};SelectMethod=cursor
Index: TestSuiteEDM.xml
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/sample_webtest/TestSuiteEDM.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestSuiteEDM.xml 25 Jan 2003 00:01:21 -0000 1.1
--- TestSuiteEDM.xml 27 Feb 2003 17:32:08 -0000 1.2
***************
*** 1,10 ****
<!DOCTYPE project [
<!ENTITY sharedConfiguration SYSTEM "./includes/sharedConfiguration.xml">
! <!ENTITY invokeHome SYSTEM "file:./includes/invokeHome.xml">
!
!
!
!
!
]>
--- 1,5 ----
<!DOCTYPE project [
<!ENTITY sharedConfiguration SYSTEM "./includes/sharedConfiguration.xml">
!
]>
***************
*** 36,488 ****
<target name="testSuite">
- <antcall target="sniffTest"/>
- <antcall target="userWithNoRedirectionID"/>
- <antcall target="userWithRedirectionIDOldStyle"/>
- <antcall target="userWithRedirectionID"/>
- <antcall target="userWithRedirectionIDBadEmailOldStyle"/>
- <antcall target="userWithRedirectionIDBadEmail"/>
-
- <antcall target="userWithExistingEmailAddress"/>
- <antcall target="userWithExistingEmailAddressOldStyle"/>
- <antcall target="userWithNewEmailAddress"/>
- <antcall target="userWithNewEmailAddressOldStyle"/>
-
- <antcall target="userWithCampaignId"/>
- <antcall target="userWithEverythingRedirectToProduct"/>
- <antcall target="userWithEverythingRedirectToProductOldStyle"/>
-
- <antcall target="redirectToExternalWebsite"/>
- <antcall target="redirectToExternalWebsiteOldStyle"/>
- <antcall target="redirectionURLEndingInSlash"/>
-
- <antcall target="unsubscribeWithBadEmailId"/>
- <antcall target="unsubscribeWithNoParameters"/>
- <antcall target="unsubscribeWithInvalidEmail"/>
- <antcall target="unsubscribeEmailAddressWithEmail"/>
- <antcall target="unsubscribeEmailAddressWithEmailID"/>
- <antcall target="unsubscribeEmailAddressWithNewEmailAddress"/>
-
<antcall target="subscribeEmailAddressWithOptedOutEmail"/>
<antcall target="subscribeEmailAddressWithNewEmailAddress"/>
<antcall target="subscribeEmailAddressWithInvalidEmailAddress"/>
- <antcall target="productWithCustomCOAHeader"/>
- <!-- NO PRODUCT CURRENTLY AVAILABLE
- <antcall target="productWithPartnerLink"/>
- -->
-
- </target>
-
-
- <target name="userWithNoRedirectionID">
- <testSpec name="userWithNoRedirectionID">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}"
- save="userWithNoRedirectionID"/>
- <verifytext stepid="Make sure we are on the homepage"
- text="Our Newest Product Releases"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="userWithRedirectionIDOldStyle">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithRedirectionID.xml" format="flat"/>
- </dbunit>
-
- <testSpec name="userWithRedirectionIDOldStyle">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}?r=1"
- save="userWithRedirectionID"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page"
- text="Upstate develops the most innovative products"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="userWithRedirectionID">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithRedirectionID.xml" format="flat"/>
- </dbunit>
-
- <testSpec name="userWithRedirectionID">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="r.q.r.e.1"
- save="userWithRedirectionID"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page"
- text="Upstate develops the most innovative products"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="userWithRedirectionIDBadEmail">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithRedirectionIDBadEmail.xml" format="flat"/>
- </dbunit>
-
-
- <testSpec name="userWithRedirectionIDBadEmail">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/r.q.r.e.1.a.e.e.userWithRedirectionIDBadEmail"
- save="userWithRedirectionIDBadEmail"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page despite the bad email"
- text="Upstate develops the most innovative products"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="userWithRedirectionIDBadEmailOldStyle">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithRedirectionIDBadEmail.xml" format="flat"/>
- </dbunit>
-
-
- <testSpec name="userWithRedirectionIDBadEmailOldStyle">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}?r=1&e=userWithRedirectionIDBadEmail"
- save="userWithRedirectionIDBadEmail"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page despite the bad email"
- text="Upstate develops the most innovative products"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="redirectionURLEndingInSlash">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/redirectionURLEndingInSlash.xml" format="flat"/>
- </dbunit>
-
-
- <testSpec name="redirectionURLEndingInSlash">
- &sharedConfiguration;
- <steps>
- <invoke stepid="redirection url ending in a slash"
- url="${r.page}?r=1/"
- save="redirectionURLEndingInSlash"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page"
- text="Upstate develops the most innovative products"/>
-
- </steps>
- </testSpec>
- </target>
-
-
- <target name="userWithExistingEmailAddressOldStyle">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithExistingEmailAddress.xml" format="flat"/>
- </dbunit>
- <testSpec name="userWithExistingEmailAddressOldStyle">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}?r=1&e=1"
- save="userWithExistingEmailAddress"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page"
- text="Upstate develops the most innovative products"/>
-
- </steps>
- </testSpec>
</target>
- <target name="userWithExistingEmailAddress">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithExistingEmailAddress.xml" format="flat"/>
- </dbunit>
- <testSpec name="userWithExistingEmailAddress">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/r.q.r.e.1.a.e.e.1"
- save="userWithExistingEmailAddress"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page"
- text="Upstate develops the most innovative products"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="userWithNewEmailAddress">
- <testSpec name="userWithNewEmailAddress">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/r.q...@te....a.r.e.1"
- save="userWithNewEmailAddress"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page"
- text="Upstate develops the most innovative products"/>
- </steps>
-
- </testSpec>
- </target>
- <target name="userWithNewEmailAddressOldStyle">
- <testSpec name="userWithNewEmailAddressOldStyle">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}?e=...@te...&r=1"
- save="userWithNewEmailAddressOldStyle"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page"
- text="Upstate develops the most innovative products"/>
- </steps>
-
- </testSpec>
- </target>
- <target name="userWithCampaignId">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithCampaignId.xml" format="flat"/>
- </dbunit>
- <testSpec name="userWithCampaignId">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}?r=1&e=1&c=1"
- save="userWithCampaignId"/>
- <verifytext stepid="Make sure we are redirected to the upstate info page"
- text="Upstate develops the most innovative products"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="userWithEverythingRedirectToProduct">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithEverythingRedirectToProduct.xml" format="flat"/>
- </dbunit>
- <testSpec name="userWithEverythingRedirectToProduct">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/r.q.r.e.2.a.e.e.2.a.c.e.2"
- save="userWithEverythingRedirectToProduct"/>
- <verifytext stepid="Make sure we are redirected to the Anti-Striatin page"
- text="Anti-Striatin"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="userWithEverythingRedirectToProductOldStyle">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/userWithEverythingRedirectToProduct.xml" format="flat"/>
- </dbunit>
- <testSpec name="userWithEverythingRedirectToProductOldStyle">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}?r=2&e=2&c=2"
- save="userWithEverythingRedirectToProductOldStyle"/>
- <verifytext stepid="Make sure we are redirected to the Anti-Striatin page"
- text="Anti-Striatin"/>
-
- </steps>
- </testSpec>
- </target>
-
-
- <target name="redirectToExternalWebsite">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/redirectToExternalWebsite.xml" format="flat"/>
- </dbunit>
- <testSpec name="redirectToExternalWebsite">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}?r=3"
- save="redirectToExternalWebsite"/>
- <verifytext stepid="Make sure we are redirected to the Sun website"
- text="Sun"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="redirectToExternalWebsiteOldStyle">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/redirectToExternalWebsite.xml" format="flat"/>
- </dbunit>
- <testSpec name="redirectToExternalWebsiteOldStyle">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${r.page}?r=3"
- save="redirectToExternalWebsite"/>
- <verifytext stepid="Make sure we are redirected to the Sun website"
- text="Sun"/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="unsubscribeWithBadEmailId">
- <testSpec name="unsubscribeWithBadEmailId">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/edm/unsubscribe.asp?e=9999999"
- save="unsubscribeWithBadEmailId"/>
- <verifytext stepid="Make sure we recieved the error message"
- text="We're sorry, but your email address could not be located."/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="unsubscribeWithNoParameters">
- <testSpec name="unsubscribeWithNoParameters">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/edm/unsubscribe.asp"
- save="unsubscribeWithNoParameters"/>
- <verifytext stepid="Make sure we recieved the error message"
- text="We're sorry, but your email address could not be located."/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="unsubscribeWithInvalidEmail">
- <testSpec name="unsubscribeWithInvalidEmail">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/edm/unsubscribe.asp?e=unsubscribeWithInvalidEmail"
- save="unsubscribeWithInvalidEmail"/>
- <verifytext stepid="Make sure we recieved the error message"
- text="We're sorry, but your email address could not be located."/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="unsubscribeEmailAddressWithEmail">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/unsubscribeEmailAddressWithEmail.xml" format="flat"/>
- </dbunit>
- <testSpec name="unsubscribeEmailAddress">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/edm/unsubscribe.asp?e=u...@te..."
- save="unsubscribeEmailAddress"/>
- <verifytext stepid="Make sure we recieved the success message"
- text="You have been removed from the Upstate mailing list."/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="unsubscribeEmailAddressWithEmailID">
- <dbunit
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- <operation type="MSSQL_REFRESH" src="data/unsubscribeEmailAddressWithEmailID.xml" format="flat"/>
- </dbunit>
- <testSpec name="unsubscribeEmailAddressWithEmailID">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/edm/unsubscribe.asp?e=1"
- save="unsubscribeEmailAddressWithEmailID"/>
- <verifytext stepid="Make sure we recieved the success message"
- text="You have been removed from the Upstate mailing list."/>
-
- </steps>
- </testSpec>
- </target>
-
- <target name="unsubscribeEmailAddressWithNewEmailAddress">
- <sql
- driver="${sql.jdbcdriver}"
- url="${sql.url}"
- userid="${sql.username}"
- password="${sql.password}">
- UPDATE email set email='uns...@te...' + convert(varchar(10),email_id)
- WHERE email='te...@te...'
-
- </sql>
- <testSpec name="unsubscribeEmailAddressWithNewEmailAddress">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="/edm/unsubscribe.asp?e=...@te..."
- save="unsubscribeEmailAddressWithNewEmailAddress"/>
- <verifytext stepid="Make sure we recieved the success message"
- text="You have been removed from the Upstate mailing list."/>
-
- </steps>
- </testSpec>
- </target>
-
<target name="subscribeEmailAddressWithNewEmailAddress">
--- 31,41 ----
***************
*** 547,604 ****
</testSpec>
</target>
-
- <target name="productWithCustomCOAHeader">
- <testSpec name="productWithCustomCOAHeader">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${start.page}"
- save="productWithCustomCOAHeader"/>
- <setinputfield stepid="search for test product 14-000"
- name="query"
- value="14-000"/>
- <clickbutton stepid="Click link to Execute QuickSearch"
- name="imageField"/>
- <verifytitle stepid="Make sure we are on product 14-000"
- text="Upstate - Product #14-000 - TEST ( 14000 )"/>
- <not>
- <verifytext stepid="Make sure there is no COA message."
- text="Certificate of Analysis:"/>
- </not>
- <verifytext stepid="Make sure there is a Product Description message."
- text="PRODUCT DESCRIPTION:"/>
- </steps>
- </testSpec>
- </target>
-
- <target name="productWithPartnerLink">
- <testSpec name="productWithPartnerLink">
- &sharedConfiguration;
- <steps>
- <invoke stepid="main page"
- url="${start.page}"
- save="productWithPartnerLink"/>
- <setinputfield stepid="search for test product 14-000"
- name="query"
- value="14-000"/>
- <clickbutton stepid="Click link to Execute QuickSearch"
- name="imageField"/>
- <verifytitle stepid="Make sure we are on product 14-000"
- text="Upstate - Product #14-000 - TEST ( 14000 )"/>
-
- <verifytext stepid="Make sure there is a link to Molecular Devices."
- text="Also available from Molecular Devices Corp."/>
- </steps>
- </testSpec>
- </target>
-
- <target name="sniffTest">
- <testSpec name="Sniff">
- &sharedConfiguration;
- <steps>
- &invokeHome;
- </steps>
- </testSpec>
- </target>
</project>
--- 100,103 ----
|
|
From: <mla...@us...> - 2003-02-26 22:52:53
|
Update of /cvsroot/dbunit/dbunit/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv14021/dbunit/docs
Modified Files:
changes.html download.html faq.html components.html
Log Message:
More updates related to the release of DbUnit 1.5
Index: changes.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/changes.html,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** changes.html 24 Feb 2003 01:40:18 -0000 1.26
--- changes.html 26 Feb 2003 22:52:46 -0000 1.27
***************
*** 49,54 ****
<li>New features:</li>
<ul>
! <li>DbUnit is now case insensitive.</li>
! <li><a href="http//sourceforge.net/tracker/index.php?func=detail&aid=555455&group_id=47439&atid=449491">555455</a>
- Supports table names escaping (see <a href="properties.html#escapepattern">escapePattern
property</a>).</li>
--- 49,55 ----
<li>New features:</li>
<ul>
! <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=533321&group_id=47439&atid=449491">533321</a>
! - DbUnit is now case insensitive.</li>
! <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=555455&group_id=47439&atid=449491">555455</a>
- Supports table names escaping (see <a href="properties.html#escapepattern">escapePattern
property</a>).</li>
***************
*** 126,137 ****
<li>Added support for binary data types: BINARY, VARBINARY and LONGVARBINARY.
Binary data is persisted in xml datasets using the base64 encoding scheme.</li>
! <li>Added the <a href="components.html#CaseInsentiveDataSet">CaseInsentiveDataSet</a>
! class. </li>
<li>Deprecated the DataSetUtils.assertEquals() methods. You should now
use Assertion.assertEquals().</li>
<li>Multiple bugfixes:</li>
<ul>
- <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=533321&group_id=47439&atid=449491">533321</a>
- - Identifiers are case sensitive. See <a href="components.html#CaseInsentiveDataSet">CaseInsentiveDataSet</a>.</li>
<li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=533537&group_id=47439&atid=449491">533537</a>
- FlatXmlDataSet and null values.</li>
--- 127,135 ----
<li>Added support for binary data types: BINARY, VARBINARY and LONGVARBINARY.
Binary data is persisted in xml datasets using the base64 encoding scheme.</li>
! <li>Added the CaseInsentiveDataSet class. </li>
<li>Deprecated the DataSetUtils.assertEquals() methods. You should now
use Assertion.assertEquals().</li>
<li>Multiple bugfixes:</li>
<ul>
<li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=533537&group_id=47439&atid=449491">533537</a>
- FlatXmlDataSet and null values.</li>
Index: download.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/download.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** download.html 24 Feb 2003 01:40:18 -0000 1.20
--- download.html 26 Feb 2003 22:52:46 -0000 1.21
***************
*** 45,52 ****
<td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2>Download</h2>
! <p>The current Dbunit release is version 1.4. 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=100096">Download
! version 1.4</a></p>
<p>If your are not reading this page online, please visit the <a href="http://www.dbunit.org">online
version</a> of this site since a more recent version of Dbunit might be
--- 45,52 ----
<td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2>Download</h2>
! <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
version</a> of this site since a more recent version of Dbunit might be
Index: faq.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/faq.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** faq.html 24 Feb 2003 01:40:19 -0000 1.20
--- faq.html 26 Feb 2003 22:52:46 -0000 1.21
***************
*** 51,55 ****
<li><a href="#clonedconnection">Why do I get a "Can't start a cloned
connection" exception when I use InsertIdentityOperation?</a></li>
! <li><a><a href="UnsatisfiedLinkError">Why do I get an "UnsatisfiedLinkError"
with the DB2 driver?</a></a></li>
<li><a href="#AmbiguousTableNameException">Why do I get a AmbiguousTableNameException?</a></li>
--- 51,55 ----
<li><a href="#clonedconnection">Why do I get a "Can't start a cloned
connection" exception when I use InsertIdentityOperation?</a></li>
! <li><a><a href="#UnsatisfiedLinkError">Why do I get an "UnsatisfiedLinkError"
with the DB2 driver?</a></a></li>
<li><a href="#AmbiguousTableNameException">Why do I get a AmbiguousTableNameException?</a></li>
Index: components.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/components.html,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** components.html 24 Feb 2003 01:40:18 -0000 1.18
--- components.html 26 Feb 2003 22:52:47 -0000 1.19
***************
*** 202,206 ****
<h4><a name="QueryDataSet">QueryDataSet</a></h4>
The <a class="code">QueryDataSet</a> allows to easily manipulates multiple
! <a href="./api/org/dbunit/database/IDatabaseConnection.html#createQueryTable(java.lang.String, java.lang.String)">query
tables</a>.<br>
<hr>
--- 202,206 ----
<h4><a name="QueryDataSet">QueryDataSet</a></h4>
The <a class="code">QueryDataSet</a> allows to easily manipulates multiple
! <a href="./api/org/dbunit/database/IDatabaseConnection.html#createQueryTable(java.lang.String,%20java.lang.String)">query
tables</a>.<br>
<hr>
|
|
From: <mla...@us...> - 2003-02-26 22:52:52
|
Update of /cvsroot/dbunit/dbunit In directory sc8-pr-cvs1:/tmp/cvs-serv14021/dbunit Modified Files: build.properties Log Message: More updates related to the release of DbUnit 1.5 Index: build.properties =================================================================== RCS file: /cvsroot/dbunit/dbunit/build.properties,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** build.properties 17 Jul 2002 01:55:19 -0000 1.7 --- build.properties 26 Feb 2003 22:52:48 -0000 1.8 *************** *** 1,3 **** ! version = 1.4 --- 1,3 ---- ! version = 1.5 |
|
From: <mla...@us...> - 2003-02-26 22:52:52
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset In directory sc8-pr-cvs1:/tmp/cvs-serv14021/dbunit/src/java/org/dbunit/dataset Modified Files: CaseInsensitiveDataSet.java CaseInsensitiveTable.java Log Message: More updates related to the release of DbUnit 1.5 Index: CaseInsensitiveDataSet.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/CaseInsensitiveDataSet.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CaseInsensitiveDataSet.java 3 Aug 2002 02:26:40 -0000 1.5 --- CaseInsensitiveDataSet.java 26 Feb 2003 22:52:47 -0000 1.6 *************** *** 20,23 **** --- 20,24 ---- * @author Manuel Laflamme * @version $Revision$ + * @deprecated All IDataSet implementations are case insensitive since DbUnit 1.5 */ public class CaseInsensitiveDataSet implements IDataSet Index: CaseInsensitiveTable.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/CaseInsensitiveTable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CaseInsensitiveTable.java 13 Jun 2002 17:24:56 -0000 1.4 --- CaseInsensitiveTable.java 26 Feb 2003 22:52:47 -0000 1.5 *************** *** 14,17 **** --- 14,18 ---- * @author Manuel Laflamme * @version $Revision$ + * @deprecated All IDataSet implementations are case insensitive since DbUnit 1.5 */ public class CaseInsensitiveTable implements ITable |
|
From: <mla...@us...> - 2003-02-24 02:37:25
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/xml
In directory sc8-pr-cvs1:/tmp/cvs-serv23029/dbunit/src/test/org/dbunit/dataset/xml
Modified Files:
FlatDtdDataSetTest.java FlatXmlTableWriteTest.java
Log Message:
Moved FileAsserts class from default to "org.dbunit.util" package.
Index: FlatDtdDataSetTest.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/xml/FlatDtdDataSetTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FlatDtdDataSetTest.java 14 Feb 2003 03:22:00 -0000 1.6
--- FlatDtdDataSetTest.java 24 Feb 2003 02:37:22 -0000 1.7
***************
*** 20,24 ****
import java.util.Comparator;
! import FileAsserts;
/**
--- 20,24 ----
import java.util.Comparator;
! import org.dbunit.util.FileAsserts;
/**
***************
*** 106,110 ****
}
! FileAsserts.assertEquals(
new BufferedReader(new FileReader(DTD_FILE)),
new BufferedReader(new FileReader(tempFile)));
--- 106,110 ----
}
! org.dbunit.util.FileAsserts.assertEquals(
new BufferedReader(new FileReader(DTD_FILE)),
new BufferedReader(new FileReader(tempFile)));
***************
*** 142,146 ****
}
! FileAsserts.assertEquals(
new BufferedReader(new FileReader(DTD_FILE)),
new BufferedReader(new FileReader(tempFile)));
--- 142,146 ----
}
! org.dbunit.util.FileAsserts.assertEquals(
new BufferedReader(new FileReader(DTD_FILE)),
new BufferedReader(new FileReader(tempFile)));
Index: FlatXmlTableWriteTest.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/dataset/xml/FlatXmlTableWriteTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** FlatXmlTableWriteTest.java 14 Feb 2003 03:22:01 -0000 1.8
--- FlatXmlTableWriteTest.java 24 Feb 2003 02:37:22 -0000 1.9
***************
*** 54,60 ****
{
out.close();
! tempFile.delete();
}
-
}
--- 54,59 ----
{
out.close();
! // tempFile.delete();
}
}
***************
*** 96,100 ****
tempFile.delete();
}
-
}
--- 95,98 ----
|
|
From: <mla...@us...> - 2003-02-24 02:37:25
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit In directory sc8-pr-cvs1:/tmp/cvs-serv23029/dbunit/src/test/org/dbunit Modified Files: Main.java Log Message: Moved FileAsserts class from default to "org.dbunit.util" package. Index: Main.java =================================================================== RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/Main.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Main.java 14 Feb 2003 03:21:59 -0000 1.25 --- Main.java 24 Feb 2003 02:37:22 -0000 1.26 *************** *** 27,37 **** import org.dbunit.dataset.xml.FlatXmlDataSet; import org.dbunit.dataset.IDataSet; import org.dbunit.operation.DatabaseOperation; ! import java.io.FileOutputStream; ! import java.io.FileInputStream; ! import java.io.FileReader; /** * @author Manuel Laflamme * @version $Revision$ --- 27,43 ---- 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; /** + * This class is a scratchpad used to try new features. + * * @author Manuel Laflamme * @version $Revision$ *************** *** 41,49 **** public static void main(String[] args) 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); // String[] tableNames = connection.createDataSet().getTableNames(); --- 47,66 ---- public static void main(String[] args) throws Exception { ! oldMain(); ! // writeXls(); ! // newSheet(); ! // createCells(); ! // createDateCells(); ! // readWriteWorkbook(); ! // cellTypes(); ! } ! ! 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); // String[] tableNames = connection.createDataSet().getTableNames(); *************** *** 54,63 **** // // ! FlatXmlDataSet.write(connection.createDataSet(), ! new FileOutputStream("test.xml")); ! // FlatXmlDataSet.write(new FlatXmlDataSet( ! // new FileInputStream("P:/dbunit-cvs/dbunit/src/xml/flatXmlDataSetDuplicateTest.xml")), ! // new FileOutputStream("flattest.xml")); ! // //////////////////////////////// --- 71,76 ---- // // ! // FlatXmlDataSet.write(connection.createDataSet(), ! // new FileOutputStream("test.xml")); // //////////////////////////////// *************** *** 80,83 **** --- 93,202 ---- // new FileOutputStream("src/dtd/flatXmlDataSetTest.dtd")); } + + /* + private static void writeXls() throws IOException, DataSetException + { + Reader in = new FileReader( + "P:/dbunit-cvs/dbunit/src/xml/dataSetTest.xml"); + FileOutputStream out = new FileOutputStream( + "P:/dbunit-cvs/dbunit/src/xml/dataSetTest.xls"); + XlsDataSet.write(new XmlDataSet(in), out); + out.close(); + } + + public static void newSheet() throws Exception + { + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet1 = wb.createSheet("new sheet"); + HSSFSheet sheet2 = wb.createSheet("second sheet"); + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + } + + public static void readWriteWorkbook() throws Exception + { + POIFSFileSystem fs = + new POIFSFileSystem(new FileInputStream("workbook.xls")); + HSSFWorkbook wb = new HSSFWorkbook(fs); + HSSFSheet sheet = wb.getSheetAt(0); + HSSFRow row = sheet.getRow(2); + HSSFCell cell = row.getCell((short)3); + if (cell == null) + cell = row.createCell((short)3); + cell.setCellType(HSSFCell.CELL_TYPE_STRING); + cell.setCellValue("a test"); + + // Write the output to a file + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + } + + public static void cellTypes() throws Exception + { + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("new sheet"); + HSSFRow row = sheet.createRow((short)2); + row.createCell((short) 0).setCellValue(1.1); + row.createCell((short) 1).setCellValue(new Date()); + row.createCell((short) 2).setCellValue("a string"); + row.createCell((short) 3).setCellValue(true); + row.createCell((short) 4).setCellType(HSSFCell.CELL_TYPE_ERROR); + + // Write the output to a file + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + } + + public static void createCells() throws Exception + { + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("new sheet"); + + // Create a row and put some cells in it. Rows are 0 based. + HSSFRow row = sheet.createRow((short)0); + // Create a cell and put a value in it. + HSSFCell cell = row.createCell((short)0); + cell.setCellValue(1); + + // Or do it on one line. + row.createCell((short)1).setCellValue(1.2); + row.createCell((short)2).setCellValue("This is a string"); + row.createCell((short)3).setCellValue(true); + + // Write the output to a file + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + } + + public static void createDateCells() throws Exception + { + HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("new sheet"); + + // Create a row and put some cells in it. Rows are 0 based. + HSSFRow row = sheet.createRow((short)0); + + // Create a cell and put a date value in it. The first cell is not styled as a date. + HSSFCell cell = row.createCell((short)0); + cell.setCellValue(new Date()); + + // we style the second cell as a date (and time). It is important to create a new cell style from the workbook + // otherwise you can end up modifying the built in style and effecting not only this cell but other cells. + HSSFCellStyle cellStyle = wb.createCellStyle(); + cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy h:mm")); + cell = row.createCell((short)1); + cell.setCellValue(new Date()); + cell.setCellStyle(cellStyle); + + // Write the output to a file + FileOutputStream fileOut = new FileOutputStream("workbook.xls"); + wb.write(fileOut); + fileOut.close(); + } + */ } |
|
From: <mla...@us...> - 2003-02-24 02:37:25
|
Update of /cvsroot/dbunit/./dbunit/src/java/org/dbunit/util In directory sc8-pr-cvs1:/tmp/cvs-serv23029/dbunit/src/java/org/dbunit/util Added Files: FileAsserts.java Log Message: Moved FileAsserts class from default to "org.dbunit.util" package. --- NEW FILE: FileAsserts.java --- package org.dbunit.util; /* * From "Dale E Martin" <dmartin@c..> * Date Thursday, March 14, 2002 2:42 pm * To ju...@ya... * Subject [junit] file assert, a starting point * * OK, this isn't rocket science or anything but it's working for me. What it * is is a couple of assert methods that compare files, so your expected * results can be located in a file. * * I did not use the diff library as the docs are in French, which I have not * studied for about 15 years and am not ready to pick back up ;-) * * I declare this code to be open to the public domain and anyone may do * anything they like with it. Before inclusion in JUnit I'm sure you'll need * to tweak it some, but it's working for my needs and maybe it will help * someone else. * * Later, * Dale * */ import java.io.*; import junit.framework.Assert; public class FileAsserts { private static String processOneLine(int lineNumber, BufferedReader expectedData, BufferedReader actualData) throws IOException { String problem = null; String expectedLine = expectedData.readLine(); if (!actualData.ready()) { problem = "at line " + lineNumber + ", expected:\n" + expectedLine + "\n" + "but actual file was not ready for reading at this line."; } else { String actualLine = actualData.readLine(); if (!expectedLine.equals(actualLine)) { // Uh oh, they did not match. problem = "at line " + lineNumber + " there was a mismatch. Expected:\n"; int maxLen = expectedLine.length(); if (expectedLine.length() > actualLine.length()) { maxLen = actualLine.length(); } int startOffset = 0; for (int i = 0; i < maxLen; i++) { if (expectedLine.charAt(i) != actualLine.charAt(i)) { startOffset = i; break; } } problem += expectedLine.substring(startOffset) + "\n" + "actual was:\n" + actualLine.substring(startOffset) + "\n"; } } return problem; } public static void assertEquals(BufferedReader expected, BufferedReader actual) throws Exception { Assert.assertNotNull(expected); Assert.assertNotNull(actual); String problem = null; try { int lineCounter = 0; while (expected.ready() && problem == null) { problem = processOneLine(lineCounter, expected, actual); lineCounter++; } } finally { expected.close(); actual.close(); } if (problem != null) { Assert.fail(problem); } } public static void assertEquals(InputStream expected, File actual) throws Exception { Assert.assertNotNull(expected); Assert.assertNotNull(actual); Assert.assertTrue(actual.canRead()); int lineCounter = 0; String problem = null; BufferedReader expectedData = new BufferedReader(new InputStreamReader(expected)); BufferedReader actualData = new BufferedReader(new InputStreamReader(new FileInputStream(actual))); assertEquals(expectedData, actualData); } public static void assertEquals(File expected, File actual) throws Exception { Assert.assertNotNull(expected); Assert.assertNotNull(actual); Assert.assertTrue(expected.canRead()); Assert.assertTrue(actual.canRead()); BufferedReader expectedData = new BufferedReader(new InputStreamReader(new FileInputStream(expected))); BufferedReader actualData = new BufferedReader(new InputStreamReader(new FileInputStream(actual))); assertEquals(expectedData, actualData); } } |
|
From: <mla...@us...> - 2003-02-24 02:37:25
|
Update of /cvsroot/dbunit/dbunit/src/test In directory sc8-pr-cvs1:/tmp/cvs-serv23029/dbunit/src/test Removed Files: FileAsserts.java Log Message: Moved FileAsserts class from default to "org.dbunit.util" package. --- FileAsserts.java DELETED --- |
|
From: <mla...@us...> - 2003-02-24 01:43:42
|
Update of /cvsroot/dbunit/dbunit
In directory sc8-pr-cvs1:/tmp/cvs-serv32758/dbunit
Modified Files:
build.xml
Log Message:
Changed default ant target from "test" to "jar".
Index: build.xml
===================================================================
RCS file: /cvsroot/dbunit/dbunit/build.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** build.xml 17 Jul 2002 01:55:19 -0000 1.6
--- build.xml 24 Feb 2003 01:43:39 -0000 1.7
***************
*** 3,7 ****
<!-- DbUnit build file - $Revision$ $Date$ -->
<!-- =================================================================== -->
! <project name="dbunit" default="test" basedir=".">
<target name="init">
<!-- include common properties -->
--- 3,7 ----
<!-- DbUnit build file - $Revision$ $Date$ -->
<!-- =================================================================== -->
! <project name="dbunit" default="jar" basedir=".">
<target name="init">
<!-- include common properties -->
***************
*** 40,44 ****
<target name="compile" depends="init">
<mkdir dir="${java.classes.dir}"/>
! <javac srcdir="${java.src.dir}" destdir="${java.classes.dir}" debug="${debug}">
<classpath>
<fileset dir="${lib.dir}">
--- 40,44 ----
<target name="compile" depends="init">
<mkdir dir="${java.classes.dir}"/>
! <javac srcdir="${java.src.dir}" destdir="${java.classes.dir}" debug="${debug}" >
<classpath>
<fileset dir="${lib.dir}">
|
|
From: <mla...@us...> - 2003-02-24 01:40:23
|
Update of /cvsroot/dbunit/dbunit/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv31912/dbunit/docs
Modified Files:
resources.html properties.html components.html download.html
changes.html anttask.html bestpractices.html support.html
intro.html faq.html index.html howto.html
Log Message:
Documentation update for the release of DbUnit 1.5.
Index: resources.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/resources.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** resources.html 17 Jul 2002 01:55:21 -0000 1.14
--- resources.html 24 Feb 2003 01:40:18 -0000 1.15
***************
*** 51,67 ****
<h2>Other Ressources</h2>
<p></p>
<p><a href="http://www.junit.org">JUnit, Testing Resources for Extreme Programming</a><br>
The home of the Java JUnit software.<br>
<br>
! <a name="RichardDallaway" href="http://www.dallaway.com/acad/dbunit.html">Unit testing database
! code</a><br>
Richard Dallaway notes about database unit testing.</p>
<p><a href="http://mockobjects.sourceforge.net/papers/jdbc_testfirst.html">Developing
JDBC applications test-first</a><br>
! The Mock Objects approach applied to JDBC development.</p>
<!-- #EndEditable -->
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
--- 51,87 ----
<h2>Other Ressources</h2>
<p></p>
+ <p><a href="http://groups.yahoo.com/group/agileDatabases/">The Agile Database
+ Mailing List</a> <font color="#FF0000">(new)</font><br>
+ Discussion about Database management with regards to Extreme Programming
+ practices and principles.</p>
+ <p><a href="http://www.agiledata.org/">The Agile Data Home Page</a> <font color="#FF0000">(new)</font><br>
+ Scott W. Ambler's site about Agile Data methodology. Ambler is sharing
+ multiple techniques about data-related software development issues. Online
+ material is going to be published in its new book titled "Agile Database
+ Techniques".<br>
+ <br>
+ <a href="http://www.martinfowler.com/articles/evodb.html">Evolutionary
+ Database Design</a> <font color="#FF0000">(new)</font><br>
+ A Martin Fowler's white paper that describes techniques that allows a
+ database design to evolve as an application develops<br>
+ </p>
+ <p><a href="http://webtest.canoo.com/">Canoo Webtest Home</a><br>
+ Canoo WebTest is a free open source tool for automated testing of web
+ applications. </p>
<p><a href="http://www.junit.org">JUnit, Testing Resources for Extreme Programming</a><br>
The home of the Java JUnit software.<br>
<br>
! <a name="RichardDallaway" href="http://www.dallaway.com/acad/dbunit.html">Unit
! testing database code</a><br>
Richard Dallaway notes about database unit testing.</p>
<p><a href="http://mockobjects.sourceforge.net/papers/jdbc_testfirst.html">Developing
JDBC applications test-first</a><br>
! The Mock Objects approach applied to JDBC development.<br>
! </p>
<!-- #EndEditable -->
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
Index: properties.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/properties.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** properties.html 16 Jun 2002 19:21:09 -0000 1.2
--- properties.html 24 Feb 2003 01:40:18 -0000 1.3
***************
*** 91,98 ****
</tr>
</table>
<!-- #EndEditable -->
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
--- 91,123 ----
</tr>
</table>
+ <h3><a name=escapepattern></a>dbunit.name.escapePattern <font color="#FF0000">(new)</font></h3>
+ <table border="1">
+ <tr>
+ <td>Description</td>
+ <td>This property allows schema, table and column names escaping. The
+ property value is an escape pattern where the ? is replaced by the
+ name. For example, the pattern "[?]" is expanded as "[MY_NAME]"
+ for a table named "MY_TABLE".<br>
+ Attention this feature is not compatible with the qualified names
+ name feature!</td>
+ </tr>
+ <tr>
+ <td>Type</td>
+ <td>java.lang.String</td>
+ </tr>
+ <tr>
+ <td>Possible Values</td>
+ <td>See description.</td>
+ </tr>
+ <tr>
+ <td>Default Value</td>
+ <td>none</td>
+ </tr>
+ </table>
<!-- #EndEditable -->
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
Index: components.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/components.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** components.html 11 Dec 2002 15:52:47 -0000 1.17
--- components.html 24 Feb 2003 01:40:18 -0000 1.18
***************
*** 7,15 ****
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - Framework Components</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
--- 7,15 ----
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - Framework Components</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
***************
*** 17,24 ****
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
--- 17,24 ----
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
***************
*** 37,49 ****
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2>Core Classes</h2>
! The following walks you through the core classes that make up DbUnit:
<ul>
<li><a href="#dataset">IDataSet (org.dbunit.dataset)</a></li>
--- 37,49 ----
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2>Core Classes</h2>
! The following walks you through the core classes that make up DbUnit:
<ul>
<li><a href="#dataset">IDataSet (org.dbunit.dataset)</a></li>
***************
*** 51,74 ****
<li><a href="#databaseoperation">DatabaseOperation (org.dbunit.operation)</a></li>
</ul>
! <p>All the above are interfaces or abstract classes and you will find yourself
using implementations or subclasses.</p>
<hr>
<h3><a name="dataset">IDataSet</a></h3>
! <p>The <a class="code">IDataSet</a> interface represents is a collection
! of data from various tables. As explained later, these data is used to
execute setup operations on a target database. </p>
! <p>The <a class="code">IDataSet</a> implementations provided by the framework
are: </p>
<ul>
<li><a href="#XmlDataSet">XmlDataSet</a></li>
! <li><a href="#FlatXmlDataSet">FlatXmlDataSet</a></li>
<li><a href="#DatabaseDataSet">DatabaseDataSet</a></li>
<li><a href="#DefaultDataSet">DefaultDataSet</a></li>
<li><a href="#CompositeDataSet">CompositeDataSet</a></li>
<li><a href="#FilteredDataSet">FilteredDataSet</a></li>
! <li><a href="#CaseInsentiveDataSet" >CaseInsentiveDataSet</a></li>
! <li><a href="#QueryDataSet" >QueryDataSet</a></li>
</ul>
! The <a class="code">IDataSet</a> interface:
<pre>public interface IDataSet
{
--- 51,73 ----
<li><a href="#databaseoperation">DatabaseOperation (org.dbunit.operation)</a></li>
</ul>
! <p>All the above are interfaces or abstract classes and you will find yourself
using implementations or subclasses.</p>
<hr>
<h3><a name="dataset">IDataSet</a></h3>
! <p>The <a class="code">IDataSet</a> interface represents is a collection
! of data from various tables. As explained later, these data is used to
execute setup operations on a target database. </p>
! <p>The <a class="code">IDataSet</a> implementations provided by the framework
are: </p>
<ul>
<li><a href="#XmlDataSet">XmlDataSet</a></li>
! <li><a href="#FlatXmlDataSet">FlatXmlDataSet</a> <font color="#FF0000">(updated)</font></li>
<li><a href="#DatabaseDataSet">DatabaseDataSet</a></li>
<li><a href="#DefaultDataSet">DefaultDataSet</a></li>
<li><a href="#CompositeDataSet">CompositeDataSet</a></li>
<li><a href="#FilteredDataSet">FilteredDataSet</a></li>
! <li><a href="#QueryDataSet" >QueryDataSet</a> <font color="#FF0000">(new)</font></li>
</ul>
! The <a class="code">IDataSet</a> interface:
<pre>public interface IDataSet
{
***************
*** 88,100 ****
*/
public ITable getTable(String tableName) throws DataSetException;
! }</pre>
! <a name="XmlDataSet">
<h4>XmlDataSet </h4>
! </a>
! <p>The <a class="code">XmlDataSet</a> class provides the persistence support
! to read from and write to the generic xml dataset format. This format
! is very generic and must conform to a predefined DTD.</p>
! <p>The generic xml dataset DTD:<br>
! </p>
<pre>
<?xml version="1.0" encoding="UTF-8"?>
--- 87,99 ----
*/
public ITable getTable(String tableName) throws DataSetException;
!
!
! /**<br> * Returns tables contained by this dataset. Multiple table having the same<br> * name but different data may be returned. This method exist since version 1.5.<br> */<br> public ITable[] getTables() throws DataSetException;<br>}</pre>
! <a name="XmlDataSet">
<h4>XmlDataSet </h4>
! </a>
! <p>The <a class="code">XmlDataSet</a> class provides the persistence support
! to read from and write to the generic XML dataset format. This format
! is very verbiose and must conform to the following DTD:</p>
<pre>
<?xml version="1.0" encoding="UTF-8"?>
***************
*** 109,113 ****
<!ELEMENT null EMPTY>
</pre>
! <a name="originalxmlsample">And here is a sample instance:</a><br>
<pre>
<!DOCTYPE dataset SYSTEM "dataset.dtd">
--- 108,112 ----
<!ELEMENT null EMPTY>
</pre>
! <a name="originalxmlsample">Example of XML document:</a><br>
<pre>
<!DOCTYPE dataset SYSTEM "dataset.dtd">
***************
*** 151,165 ****
</dataset></pre>
<h4><a name="FlatXmlDataSet">FlatXmlDataSet</a></h4>
! <p>The <a class="code">FlatXmlDataSet</a> class has been introduced in version
! 1.2 because I found that generic xml datasets were hard to create and
! to maintain. This was particularly painful for tables with several columns.
! </p>
! <p>In the flat xml format, each xml element corresponds to a table row.
! Each element name corresponds to its table name. The columns correspond
! to attributes. This format has no predefined DTD since it is different
! for each database. DbUnit can generate a DTD for your database (see the
! <a href="howto.html#generatedtd">How-to guide</a>). </p>
! <p> Here is a sample dataset containing the same data than the <a href="#originalxmlsample">XmlDataSet
! sample</a>:<br>
</p>
<pre>
--- 150,160 ----
</dataset></pre>
<h4><a name="FlatXmlDataSet">FlatXmlDataSet</a></h4>
! <p>The <a class="code">FlatXmlDataSet</a> class has been introduced in version
! 1.2. I found that generic XML datasets were hard to write and to maintain.
! This was particularly painful for tables having a lot of columns. </p>
! <p>In the flat XML format, each XML element corresponds to a table row.
! Each XML element name corresponds to a table name. The XML attributes
! correspond to table columns. Here is an example dataset containing the
! same data than the <a href="#originalxmlsample">XmlDataSet example</a>:<br>
</p>
<pre>
***************
*** 173,222 ****
<EMPTY_TABLE/>
</dataset></pre>
<h5>Null Values</h5>
! To specify a null value, you simply have to omit its corresponding attribute.
! In the above example, COLUMN1 and COLUMN2 are nulls for the second row of
! TEST_TABLE.
<h5>Table metadata</h5>
! DbUnit generate table metadata from the DTD pointed by the document type
! declaration. DbUnit only support external system URI. The URI can be absolute
! or relative.
! <p> Example of system document type declaration:
<pre><!DOCTYPE dataset SYSTEM "my-dataset.dtd"></pre>
! <p>If the xml document does not contain a document type declaration, the
! metadata is generated from the first row of each table. This is highly
! recommended to always provide a document type declaration since DbUnit
! will think your table is missing some columns if the first row has one
! or more null values.
<h4><a name="DatabaseDataSet">DatabaseDataSet</a></h4>
! The <a class=code>DatabaseDataSet</a> is an adapter class that allows access
! to a database contents as a dataset. This class is not usually instantiated
directly but from the factory method <a class="code">IDatabaseConnection.createDataSet()</a>.<br>
<h4><a name="DefaultDataSet">DefaultDataSet</a></h4>
! The <a class=code>DefaultDataSet</a> class can be used to create datasets
programmatically. <br>
<h4><a name="CompositeDataSet">CompositeDataSet</a></h4>
! The <a class=code>CompositeDataSet</a> class combines multiple datasets
into a single one at runtime.<br>
<h4><a name="FilteredDataSet">FilteredDataSet</a></h4>
! The <a class="code">FileteredDataSet</a> class is is a decorator which exposes
only some tables from the decorated dataset. <br>
- <h4><a name="CaseInsentiveDataSet">CaseInsentiveDataSet</a></h4>
- The <a class="code">CaseInsentiveDataSet</a> class is a decorator that allows
- access to a decorated dataset in a case insensitive way. Dataset implementations
- provided by the framework are case sensitive. This class allows using them
- in situation where case sensitiveness is not desirable. <br>
<h4><a name="QueryDataSet">QueryDataSet</a></h4>
! The <a class="code">QueryDataSet</a> class is a dataset that allows you to
! add tables, and the sql to extract the data to populate the table. It is
! currently only used by the Ant query step and export step.<br>
<hr>
<h3><a name="databaseconnection">IDatabaseConnection</a></h3>
! <p>As its name implies, the <a class="code">IDatabaseConnection</a> represent
a connection to a database. </p>
<p>The DbUnit framework provides two implementations: </p>
<ul>
! <li><a class="code">DatabaseConnection</a>, which is a JDBC Connection
adapter.</li>
! <li><a class="code">DatabaseDataSourceConnection</a>, which is a JDBC
DataSource adapter.<br>
</li>
--- 168,216 ----
<EMPTY_TABLE/>
</dataset></pre>
+ Learn how to export your database data to this format <a href="howto.html#extract">here</a>
+ and how to generate a DTD representing your database schema <a href="howto.html#generatedtd">here</a>.
+ Note that DbUnit does not automatically add a reference to your DTD when
+ you export a dataset. You must edit the output file to manually add the
+ DOCTYPE declaration.
<h5>Null Values</h5>
! To specify a null value, you simply have to omit its corresponding attribute.
! In the above example, COLUMN1 and COLUMN2 are nulls for the second row of
! TEST_TABLE.
<h5>Table metadata</h5>
! DbUnit use the DTD referenced by the document type declaration as metadata.
! DbUnit only support external system URI. The URI can be absolute or relative.
! <p> Example of system document type declaration:
<pre><!DOCTYPE dataset SYSTEM "my-dataset.dtd"></pre>
! <p>If the xml document does not contain a document type declaration, the
! metadata is generated from the first row of each table. This is highly
! recommended to always provide a document type declaration since DbUnit
! will think your table is missing some columns if the first row has one
! or more null values.
<h4><a name="DatabaseDataSet">DatabaseDataSet</a></h4>
! The <a class=code>DatabaseDataSet</a> is an adapter class that allows access
! to a database contents as a dataset. This class is not usually instantiated
directly but from the factory method <a class="code">IDatabaseConnection.createDataSet()</a>.<br>
<h4><a name="DefaultDataSet">DefaultDataSet</a></h4>
! The <a class=code>DefaultDataSet</a> class can be used to create datasets
programmatically. <br>
<h4><a name="CompositeDataSet">CompositeDataSet</a></h4>
! The <a class=code>CompositeDataSet</a> class combines multiple datasets
into a single one at runtime.<br>
<h4><a name="FilteredDataSet">FilteredDataSet</a></h4>
! The <a class="code">FileteredDataSet</a> class is is a decorator which exposes
only some tables from the decorated dataset. <br>
<h4><a name="QueryDataSet">QueryDataSet</a></h4>
! The <a class="code">QueryDataSet</a> allows to easily manipulates multiple
! <a href="./api/org/dbunit/database/IDatabaseConnection.html#createQueryTable(java.lang.String, java.lang.String)">query
! tables</a>.<br>
<hr>
<h3><a name="databaseconnection">IDatabaseConnection</a></h3>
! <p>As its name implies, the <a class="code">IDatabaseConnection</a> represent
a connection to a database. </p>
<p>The DbUnit framework provides two implementations: </p>
<ul>
! <li><a class="code">DatabaseConnection</a>, which is a JDBC Connection
adapter.</li>
! <li><a class="code">DatabaseDataSourceConnection</a>, which is a JDBC
DataSource adapter.<br>
</li>
***************
*** 224,229 ****
<hr>
<h3><a name="databaseoperation">DatabaseOperation</a></h3>
! <p>The <a class="code">DatabaseOperation</a> abstract class defines operations
! performed on a target database before and after each test. Again, the
framework provides several implementations. <br>
</p>
--- 218,223 ----
<hr>
<h3><a name="databaseoperation">DatabaseOperation</a></h3>
! <p>The <a class="code">DatabaseOperation</a> abstract class defines operations
! performed on a target database before and after each test. Again, the
framework provides several implementations. <br>
</p>
***************
*** 240,246 ****
<li><a href="#IdentityInsertOperation">IdentityInsertOperation</a> </li>
</ul>
! <p>The two most usefull operations are <a href="#refresh">REFRESH</a> and
! <a href="#cleanInsert">CLEAN_INSERT</a>. As you will shortly see, they
! are the ones you will deal with most of the time. They represent two opposite
testing strategies with different benefits and tradeoffs. </p>
<p>The <a class="code">DatabaseOperation</a> class declaration: </p>
--- 234,240 ----
<li><a href="#IdentityInsertOperation">IdentityInsertOperation</a> </li>
</ul>
! <p>The two most usefull operations are <a href="#refresh">REFRESH</a> and
! <a href="#cleanInsert">CLEAN_INSERT</a>. As you will shortly see, they
! are the ones you will deal with most of the time. They represent two opposite
testing strategies with different benefits and tradeoffs. </p>
<p>The <a class="code">DatabaseOperation</a> class declaration: </p>
***************
*** 272,310 ****
}</pre>
<h4><a name="update">DatabaseOperation</a>.UPDATE</h4>
! This operation updates the database from the dataset contents. This operation
! assumes that table data already exists in the target database and fails
if this is not the case.<br>
<br>
<h4><a name="insert">DatabaseOperation.INSERT</a></h4>
! This operation inserts the dataset contents into the database. This operation
! assumes that table data does not exist in the target database and fails
! if this is not the case. To prevent problems with foreign keys, tables must
be sequenced appropriately in the dataset. <br>
<h4><a name="delete">DatabaseOperation.DELETE</a></h4>
! This operation deletes only the dataset contents from the database. This
! operation does not delete the entire table contents but only data that are
present in the dataset. <br>
<h4><a name="deleteall">DatabaseOperation.DELETE_ALL</a></h4>
! This operation deletes entire target database table contents for each table
! contained in dataset. In other words, if a dataset does not contain a particular
! table, but that table exists in the database, the contents of that table
is not deleted. Deletes are performed on table in reverse sequence.<br>
<h4><a name="refresh">DatabaseOperation.REFRESH</a></h4>
! This operation literally refreshes dataset contents into the target database.
! This means that data of existing rows are updated and non-existing row get
! inserted. Any rows which exist in the database but not in dataset stay unaffected.
! This approach is more appropriate for tests that assume other data may exist
in the database. <br>
<br>
! As you understand, this is a very powerful operation. This strategy can
! help you deal more easily with foreign key constraints, as you don't necessarily
need to insert data in a specific sequence. <br>
<br>
! If they are correctly written, tests using this strategy can even be performed
on a populated database like a copy of a production database. <br>
<h4><a name="cleaninsert">DatabaseOperation.CLEAN_INSERT</a></h4>
! This composite operation performs a DELETE_ALL operation followed by an
! INSERT operation. This is the safest approach to ensure that the database
! is in a known state. This is appropriate for tests that require the database
to only contain a specific set of data.<br>
<h4><a name="none">DatabaseOperation.NONE</a></h4>
--- 266,304 ----
}</pre>
<h4><a name="update">DatabaseOperation</a>.UPDATE</h4>
! This operation updates the database from the dataset contents. This operation
! assumes that table data already exists in the target database and fails
if this is not the case.<br>
<br>
<h4><a name="insert">DatabaseOperation.INSERT</a></h4>
! This operation inserts the dataset contents into the database. This operation
! assumes that table data does not exist in the target database and fails
! if this is not the case. To prevent problems with foreign keys, tables must
be sequenced appropriately in the dataset. <br>
<h4><a name="delete">DatabaseOperation.DELETE</a></h4>
! This operation deletes only the dataset contents from the database. This
! operation does not delete the entire table contents but only data that are
present in the dataset. <br>
<h4><a name="deleteall">DatabaseOperation.DELETE_ALL</a></h4>
! This operation deletes entire target database table contents for each table
! contained in dataset. In other words, if a dataset does not contain a particular
! table, but that table exists in the database, the contents of that table
is not deleted. Deletes are performed on table in reverse sequence.<br>
<h4><a name="refresh">DatabaseOperation.REFRESH</a></h4>
! This operation literally refreshes dataset contents into the target database.
! This means that data of existing rows are updated and non-existing row get
! inserted. Any rows which exist in the database but not in dataset stay unaffected.
! This approach is more appropriate for tests that assume other data may exist
in the database. <br>
<br>
! As you understand, this is a very powerful operation. This strategy can
! help you deal more easily with foreign key constraints, as you don't necessarily
need to insert data in a specific sequence. <br>
<br>
! If they are correctly written, tests using this strategy can even be performed
on a populated database like a copy of a production database. <br>
<h4><a name="cleaninsert">DatabaseOperation.CLEAN_INSERT</a></h4>
! This composite operation performs a DELETE_ALL operation followed by an
! INSERT operation. This is the safest approach to ensure that the database
! is in a known state. This is appropriate for tests that require the database
to only contain a specific set of data.<br>
<h4><a name="none">DatabaseOperation.NONE</a></h4>
***************
*** 313,331 ****
This operation combines multiple operations into a single one.<br>
<h4><a name="TransactionOperation">TransactionOperation</a></h4>
! <p>This operation decorates an operation and executes it within the context
of a transaction.</p>
<h4><a name="IdentityInsertOperation">IdentityInsertOperation<a ></a></a></h4>
! <p>This operation decorates an operation and disables the MS SQL Server
! automatic identifier generation (IDENTITY) during its execution.</p>
! <!-- #EndEditable -->
<hr>
! <div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
! <p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
! - <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
! Task</a> - <a href="howto.html">How-to Guides</a> - <a href="bestpractices.html">Best
! Practices</a> - <a href="properties.html">Properties</a> - <a href="api/index.html">API
! Reference</a> - <a href="faq.html">FAQ</a> - <a href="changes.html">Changes
! History</a> - <a href="download.html">Download</a> - <a href="support.html">Support</a>
- <a href="resources.html">Resources</a></font></p>
<font size="1">$Revision$ $Date$</font> </div>
--- 307,328 ----
This operation combines multiple operations into a single one.<br>
<h4><a name="TransactionOperation">TransactionOperation</a></h4>
! <p>This operation decorates an operation and executes it within the context
of a transaction.</p>
<h4><a name="IdentityInsertOperation">IdentityInsertOperation<a ></a></a></h4>
! <p>This operation decorates an insert operation and disables the MS SQL
! Server automatic identifier generation (IDENTITY) during its execution.
! Use following constants InsertIdentityOperation.INSERT, InsertIdentityOperation.CLEAN_INSERT
! or InsertIdentityOperation.REFRESH instead of those defined in DatabaseOperation.</p>
! <!-- #EndEditable -->
<hr>
! <div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
! <p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
! - <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
! Task</a> - <a href="howto.html">How-to Guides</a> - <a href="bestpractices.html">Best
! Practices</a> - <a href="properties.html">Properties</a> - <a href="api/index.html">API
! Reference</a> - <a href="faq.html">FAQ</a> - <a href="changes.html">Changes
! History</a> - <a href="download.html">Download</a> - <a href="support.html">Support</a>
- <a href="resources.html">Resources</a></font></p>
<font size="1">$Revision$ $Date$</font> </div>
Index: download.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/download.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** download.html 17 Jul 2002 01:55:21 -0000 1.19
--- download.html 24 Feb 2003 01:40:18 -0000 1.20
***************
*** 55,59 ****
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
--- 55,60 ----
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
Index: changes.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/changes.html,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** changes.html 17 Jul 2002 01:55:21 -0000 1.25
--- changes.html 24 Feb 2003 01:40:18 -0000 1.26
***************
*** 43,47 ****
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" --> <a name="1.4">
<h2>Changes in version 1.4 from 1.3</h2>
</a>
--- 43,84 ----
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" --> <a name="1.5">
! <h2>Changes in version 1.5 from 1.4</h2>
! </a>
! <ul>
! <li>New features:</li>
! <ul>
! <li>DbUnit is now case insensitive.</li>
! <li><a href="http//sourceforge.net/tracker/index.php?func=detail&aid=555455&group_id=47439&atid=449491">555455</a>
! - Supports table names escaping (see <a href="properties.html#escapepattern">escapePattern
! property</a>).</li>
! <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=551925&group_id=47439&atid=449494">551925</a>
! - Allows duplicate table names in datasets. A new method, <a class=code>getTables()</a>,
! have been added in the <a class=code>IDataSet</a> interface.</li>
! <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=684610&group_id=47439&atid=449494">590245</a>
! / <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=590245&group_id=47439&atid=449494">684610</a>
! - New <a class=code>Reader</a> and <a class=code>Writers</a> methods
! to read and write XML datasets. <a class=code>InputStream</a> and
! <a class=code>OutputStream</a> methods are now deprecated.</li>
! <li>New <a class=code>SortedTable</a> and <a class="code">SortedDataSet</a>
! decorator classes.</li>
! </ul>
! <li>Ant Task:</li>
! <ul>
! <li><a href="http://sourceforge.net/tracker/index.php?func=detail&aid=645691&group_id=47439&atid=449491">645691</a>
! - Added the <a class=code><classpath></a> nested element in
! <a class=code> <dbunit></a> ant task; used to load the JDBC
! classes.</li>
! <li>Added <a class=code><query></a> nested element in <a class=code><export></a>.
! Allows exporting the result of a SELECT as a table of a dataset. See
! <a href="anttask.html">ant task documentation</a>.</li>
! </ul>
! <li>New <a href="http://webtest.canoo.com/">Canoo Webtest</a> integration
! <a href="howto.html#canoo">guide</a>.</li>
! <li>Updated the dataset assertion <a href="howto.html#assertdata">guide</a>.
! </li>
! <li>Multiple bugfixes.</li>
! </ul>
! <a name="1.4">
<h2>Changes in version 1.4 from 1.3</h2>
</a>
***************
*** 160,164 ****
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
--- 197,202 ----
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
Index: anttask.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/anttask.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** anttask.html 16 Feb 2003 17:41:15 -0000 1.4
--- anttask.html 24 Feb 2003 01:40:18 -0000 1.5
***************
*** 7,15 ****
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - Ant Task</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
--- 7,15 ----
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - Ant Task</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
***************
*** 17,24 ****
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
--- 17,24 ----
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
***************
*** 37,44 ****
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
--- 37,44 ----
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
***************
*** 243,247 ****
<td>name</td>
<td>Name of the database table to export.</td>
! <td>No</td>
</tr>
</table>
--- 243,247 ----
<td>name</td>
<td>Name of the database table to export.</td>
! <td>Yes</td>
</tr>
</table>
***************
*** 262,266 ****
<td>name</td>
<td>Name to reference the sql statement.</td>
! <td>No</td>
</tr>
<tr>
--- 262,266 ----
<td>name</td>
<td>Name to reference the sql statement.</td>
! <td>Yes</td>
</tr>
<tr>
***************
*** 268,272 ****
<td>The sql to execute. You can use either SELECT * from
Mytable or SELECT col1, col4 from MyTable</td>
! <td>No</td>
</tr>
</table>
--- 268,272 ----
<td>The sql to execute. You can use either SELECT * from
Mytable or SELECT col1, col4 from MyTable</td>
! <td>Yes</td>
</tr>
</table>
***************
*** 329,340 ****
<!-- #EndEditable -->
<hr>
! <div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
! <p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
! - <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
! Task</a> - <a href="howto.html">How-to Guides</a> - <a href="bestpractices.html">Best
! Practices</a> - <a href="properties.html">Properties</a> - <a href="api/index.html">API
! Reference</a> - <a href="faq.html">FAQ</a> - <a href="changes.html">Changes
! History</a> - <a href="download.html">Download</a> - <a href="support.html">Support</a>
- <a href="resources.html">Resources</a></font></p>
<font size="1">$Revision$ $Date$</font> </div>
--- 329,341 ----
<!-- #EndEditable -->
<hr>
! <div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
! <p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
! - <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
! Task</a> - <a href="howto.html">How-to Guides</a> - <a href="bestpractices.html">Best
! Practices</a> - <a href="properties.html">Properties</a> - <a href="api/index.html">API
! Reference</a> - <a href="faq.html">FAQ</a> - <a href="changes.html">Changes
! History</a> - <a href="download.html">Download</a> - <a href="support.html">Support</a>
- <a href="resources.html">Resources</a></font></p>
<font size="1">$Revision$ $Date$</font> </div>
Index: bestpractices.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/bestpractices.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** bestpractices.html 17 Jul 2002 01:55:20 -0000 1.16
--- bestpractices.html 24 Feb 2003 01:40:19 -0000 1.17
***************
*** 115,119 ****
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
--- 115,120 ----
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
Index: support.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/support.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** support.html 16 Jun 2002 19:21:09 -0000 1.12
--- support.html 24 Feb 2003 01:40:19 -0000 1.13
***************
*** 55,59 ****
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
--- 55,60 ----
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
Index: intro.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/intro.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** intro.html 16 Jun 2002 19:21:09 -0000 1.5
--- intro.html 24 Feb 2003 01:40:19 -0000 1.6
***************
*** 133,137 ****
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
--- 133,138 ----
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
- <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
Index: faq.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/faq.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** faq.html 11 Dec 2002 15:52:48 -0000 1.19
--- faq.html 24 Feb 2003 01:40:19 -0000 1.20
***************
*** 7,15 ****
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - FAQ</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
--- 7,15 ----
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - FAQ</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
***************
*** 17,24 ****
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
--- 17,24 ----
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
***************
*** 37,101 ****
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2><a name="faq">Frequently asked questions</a></h2>
<ul>
<li><a href="#supportedvendors">Which database system are supported?</a></li>
! <li><a href="#identity">Can I use DbUnit with IDENTITY or auto-increment
columns?</a></li>
! <li><a href="#clonedconnection">Why do I get a "Can't start a cloned
connection" exception when I use InsertIdentityOperation?</a></li>
! <li><a><a href="UnsatisfiedLinkError">Why do I get an "UnsatisfiedLinkError"
with the DB2 driver?</a></a></li>
<li><a href="#AmbiguousTableNameException">Why do I get a AmbiguousTableNameException?</a></li>
! <li><a href="#NoSuchColumnException">Why do I get a org.dbunit.dataset.NoSuchColumnException?</a></li>
</ul>
<hr>
<h3><a name="supportedvendors">Which database systems are supported?</a></h3>
! <p>The Dbunit framework has been developed and tested with Oracle and HypersonicSQL.
! It uses a fairly simple SQL syntax and should be compatible with the other
! database systems. <a href="support.html">Let us know</a> if you find any
incompatibilities.</p>
! <p>
! <h3><a name="identity">Can I use DbUnit with IDENTITY or auto-increment
columns?</a></h3>
! <p>Auto-increment columns must be disabled in order to insert the dataset
! values into the database. The way to disable this feature is database
! specific. If your database does not provide a way to disable this feature
then you are out of luck and DbUnit cannot be used with it. </p>
! <p>Since version 1.4, DbUnit support IDENTITY columns for MS SQL Server
! with the class <a href="components.html#IdentityInsertOperation">IdentityInsertOperation</a>.
<br>
</p>
! <p>
! <h3><a name="clonedconnection">Why I get a "Can't start a cloned connection"
exception when I use InsertIdentityOperation?</a></h3>
<p></p>
! <p>If you are using the Microsoft driver (i.e. <a class=code>com.microsoft.jdbc.sqlserver.SQLServerDriver</a>),
! you'll need to use the <a class=code>SelectMethod=cursor</a> parameter
! in the JDBC connection string (as outlined by <a href="http://forum.java.sun.com/thread.jsp?forum=48&thread=184797">this
! JDC thread</a>). Your database Url would look something like the following:
</p>
! <p>
<pre>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb;SelectMethod=cursor
-
</pre>
<h3><br>
! <a name="UnsatisfiedLinkError">Why I get an "UnsatisfiedLinkError"
with the DB2 driver?</a></h3>
! <p>DbUnit uses JDBC 2.0 features (batch updates). By default, DB2 installs
! the JDBC 1.0 driver. You have to install the JDBC 2.0 driver in order
! for DbUnit to work or you will get an <a class="code">UnsatisfiedLinkError</a>
from the DB2 JDBC 1.0 driver.</p>
! <p>The steps for installing the DB2 JDBC 2.0 driver are covered in the DB2
documentation.</p>
<h3><a name="AmbiguousTableNameException">Why I get a AmbiguousTableNameException?</a></h3>
! <p>This situation occurs when no schema is specified and that DbUnit detect
! that it is getting columns information from multiple tables having the
same name and located in different schemas.</p>
<p>You can solve this problem in three different ways:<br>
--- 37,101 ----
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2><a name="faq">Frequently asked questions</a></h2>
<ul>
<li><a href="#supportedvendors">Which database system are supported?</a></li>
! <li><a href="#identity">Can I use DbUnit with IDENTITY or auto-increment
columns?</a></li>
! <li><a href="#clonedconnection">Why do I get a "Can't start a cloned
connection" exception when I use InsertIdentityOperation?</a></li>
! <li><a><a href="UnsatisfiedLinkError">Why do I get an "UnsatisfiedLinkError"
with the DB2 driver?</a></a></li>
<li><a href="#AmbiguousTableNameException">Why do I get a AmbiguousTableNameException?</a></li>
! <li><a href="#flatxmlnull">How to specify NULL values with flat XML dataset?</a>
! <font color="#FF0000">(new)</font> </li>
</ul>
<hr>
<h3><a name="supportedvendors">Which database systems are supported?</a></h3>
! <p>The Dbunit framework has been developed and tested with Oracle and HypersonicSQL.
! It uses a fairly simple SQL syntax and should be compatible with the other
! database systems. <a href="support.html">Let us know</a> if you find any
incompatibilities.</p>
! <p>
! <h3><a name="identity">Can I use DbUnit with IDENTITY or auto-increment
columns?</a></h3>
! <p>Auto-increment columns must be disabled in order to insert the dataset
! values into the database. The way to disable this feature is database
! specific. If your database does not provide a way to disable this feature
then you are out of luck and DbUnit cannot be used with it. </p>
! <p>Since version 1.4, DbUnit support IDENTITY columns for MS SQL Server
! with the class <a href="components.html#IdentityInsertOperation">IdentityInsertOperation</a>.
<br>
</p>
! <p>
! <h3><a name="clonedconnection">Why I get a "Can't start a cloned connection"
exception when I use InsertIdentityOperation?</a></h3>
<p></p>
! <p>If you are using the Microsoft driver (i.e. <a class=code>com.microsoft.jdbc.sqlserver.SQLServerDriver</a>),
! you'll need to use the <a class=code>SelectMethod=cursor</a> parameter
! in the JDBC connection string (as outlined by <a href="http://forum.java.sun.com/thread.jsp?forum=48&thread=184797">this
! JDC thread</a>). Your database Url would look something like the following:
</p>
! <p>
<pre>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb;SelectMethod=cursor
</pre>
<h3><br>
! <a name="UnsatisfiedLinkError">Why I get an "UnsatisfiedLinkError"
with the DB2 driver?</a></h3>
! <p>DbUnit uses JDBC 2.0 features (batch updates). By default, DB2 installs
! the JDBC 1.0 driver. You have to install the JDBC 2.0 driver in order
! for DbUnit to work or you will get an <a class="code">UnsatisfiedLinkError</a>
from the DB2 JDBC 1.0 driver.</p>
! <p>The steps for installing the DB2 JDBC 2.0 driver are covered in the DB2
documentation.</p>
<h3><a name="AmbiguousTableNameException">Why I get a AmbiguousTableNameException?</a></h3>
! <p>This situation occurs when no schema is specified and that DbUnit detect
! that it is getting columns information from multiple tables having the
same name and located in different schemas.</p>
<p>You can solve this problem in three different ways:<br>
***************
*** 104,127 ****
3. Use fully qualified table names as specified <a href="howto.html#multipleschema">here</a>.<br>
</p>
! <br>
! <h3><a name="NoSuchColumnException">Why I get a NoSuchColumnException?</a></h3>
! <p>If you use the query ant step to export data, you can enter SELECT ORDER_ID from Orders. However, if the
! ORDER_ID column is really Order_ID, then when you attempt to insert the data back into the database you will
! get an exception like: org.dbunit.dataset.NoSuchColumnException: ORDERS.ORDER_ID</p>
!
!
! <p><br>
! </p>
! <p></p>
! <!-- #EndEditable -->
<hr>
! <div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
! <p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
! - <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
! Task</a> - <a href="howto.html">How-to Guides</a> - <a href="bestpractices.html">Best
! Practices</a> - <a href="properties.html">Properties</a> - <a href="api/index.html">API
! Reference</a> - <a href="faq.html">FAQ</a> - <a href="changes.html">Changes
! History</a> - <a href="download.html">Download</a> - <a href="support.html">Support</a>
- <a href="resources.html">Resources</a></font></p>
<font size="1">$Revision$ $Date$</font> </div>
--- 104,120 ----
3. Use fully qualified table names as specified <a href="howto.html#multipleschema">here</a>.<br>
</p>
! <h3><a name="flatxmlnull">How to specify NULL values with flat XML dataset</a></h3>
! <p>See FlatXmlDataSet documentation <a href="components.html#FlatXmlDataSet">here</a>.</p>
! <!-- #EndEditable -->
<hr>
! <div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
! <p><font size="1"><a href="index.html">Home</a> - <a href="intro.html">Introduction</a>
! - <a href="components.html">Core Classes</a> - <a href="anttask.html">Ant
! Task</a> - <a href="howto.html">How-to Guides</a> - <a href="bestpractices.html">Best
! Practices</a> - <a href="properties.html">Properties</a> - <a href="api/index.html">API
! Reference</a> - <a href="faq.html">FAQ</a> - <a href="changes.html">Changes
! History</a> - <a href="download.html">Download</a> - <a href="support.html">Support</a>
- <a href="resources.html">Resources</a></font></p>
<font size="1">$Revision$ $Date$</font> </div>
Index: index.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/index.html,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** index.html 13 Dec 2002 21:58:49 -0000 1.24
--- index.html 24 Feb 2003 01:40:19 -0000 1.25
***************
*** 7,15 ****
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - Home</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
--- 7,15 ----
<!-- #BeginEditable "doctitle" -->
<title>The Dbunit Framework - Home</title>
! <!-- #EndEditable -->
</head>
<body>
<table cellspadding = 0 cellspacing = 0 border = 0 width="100%">
! <tr height="100">
<td class="logo" width = 200><img src="images/logo.jpg" width=200 height=100></td>
<td class="header"></td>
***************
*** 17,24 ****
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
--- 17,24 ----
</table>
<table cellspadding = 0 cellspacing = 0 border = 0>
! <tr>
!
! <td class="menu" nowrap valign="top" >
! <p><a href="index.html">Home</a><br>
<br>
<a href="intro.html">Introduction</a><br>
***************
*** 37,76 ****
<br>
</p>
! <div align="center"><a href="http://sourceforge.net"> <img alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=47439">
</a></div>
<br>
! <div align="center"><a href="http://www.silphid.com/"><img alt="Silphid Creations"
src="images/silphid.gif" border=0></a></div>
</td>
! <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>
! </a>
<ul>
! <li>2002-12-13 - New JUnit testing profile for Microsoft SQL Server added, plus new testcase for inserting identity columns.</li>
! <li>2002-12-11 - New query element added to ant task</li>
<li>2002-07-17 - The java API documentation is now available <a href="api/index.html">online</a>.</li>
<li>2002-07-17 - Version 1.4 released. See <a href="changes.html#1.4">changes</a>.</li>
! <li>2002-05-10 - Timothy Ruppert and Ben Cox joined the DbUnit developement
team.</li>
<li>2002-04-04 - Version 1.3 released. See <a href="changes.html#1.3">changes</a>.</li>
! <li>2002-04...
[truncated message content] |
|
From: <mla...@us...> - 2003-02-24 01:40:23
|
Update of /cvsroot/dbunit/dbunit/docs/Templates
In directory sc8-pr-cvs1:/tmp/cvs-serv31912/dbunit/docs/Templates
Modified Files:
main.dwt
Log Message:
Documentation update for the release of DbUnit 1.5.
Index: main.dwt
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/Templates/main.dwt,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** main.dwt 16 Jun 2002 19:21:09 -0000 1.13
--- main.dwt 24 Feb 2003 01:40:19 -0000 1.14
***************
*** 48,52 ****
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="../index.html">Home</a> - <a href="../intro.html">Introduction</a>
- <a href="../components.html">Core Classes</a> - <a href="../anttask.html">Ant
--- 48,53 ----
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="../index.html">Home</a> - <a href="../intro.html">Introduction</a>
- <a href="../components.html">Core Classes</a> - <a href="../anttask.html">Ant
|
|
From: <mla...@us...> - 2003-02-24 01:40:22
|
Update of /cvsroot/dbunit/dbunit/docs/api
In directory sc8-pr-cvs1:/tmp/cvs-serv31912/dbunit/docs/api
Modified Files:
index.html
Log Message:
Documentation update for the release of DbUnit 1.5.
Index: index.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/api/index.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** index.html 16 Jun 2002 19:21:09 -0000 1.13
--- index.html 24 Feb 2003 01:40:19 -0000 1.14
***************
*** 51,55 ****
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002, Manuel Laflamme, All Rights Reserved</font></p>
<p><font size="1"><a href="../index.html">Home</a> - <a href="../intro.html">Introduction</a>
- <a href="../components.html">Core Classes</a> - <a href="../anttask.html">Ant
--- 51,56 ----
<hr>
<div align="center">
! <p><font size="2">Copyright ©2002-2003, Manuel Laflamme, All Rights
! Reserved</font></p>
<p><font size="1"><a href="../index.html">Home</a> - <a href="../intro.html">Introduction</a>
- <a href="../components.html">Core Classes</a> - <a href="../anttask.html">Ant
|
|
From: <mla...@us...> - 2003-02-21 13:13:21
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset
In directory sc8-pr-cvs1:/tmp/cvs-serv5941/dbunit/src/java/org/dbunit/dataset
Modified Files:
SortedTable.java
Log Message:
Fixed null pointer exception introduced in last commit (reported by Gaetano Di Gregorio).
Index: SortedTable.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/SortedTable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SortedTable.java 20 Feb 2003 21:22:45 -0000 1.2
--- SortedTable.java 21 Feb 2003 13:13:17 -0000 1.3
***************
*** 74,78 ****
{
Integer[] indexes = new Integer[getRowCount()];
! for (int i = 0; i < _indexes.length; i++)
{
indexes[i] = new Integer(i);
--- 74,78 ----
{
Integer[] indexes = new Integer[getRowCount()];
! for (int i = 0; i < indexes.length; i++)
{
indexes[i] = new Integer(i);
***************
*** 81,85 ****
try
{
! Arrays.sort(_indexes, new RowComparator());
}
catch (DatabaseUnitRuntimeException e)
--- 81,85 ----
try
{
! Arrays.sort(indexes, new RowComparator());
}
catch (DatabaseUnitRuntimeException e)
|
|
From: <mla...@us...> - 2003-02-20 21:22:50
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset
In directory sc8-pr-cvs1:/tmp/cvs-serv2918/src/java/org/dbunit/dataset
Modified Files:
SortedTable.java
Log Message:
Added some javadoc and modified the _indexes affectation in getOriginalRowIndex().
Index: SortedTable.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/dataset/SortedTable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SortedTable.java 20 Feb 2003 03:55:17 -0000 1.1
--- SortedTable.java 20 Feb 2003 21:22:45 -0000 1.2
***************
*** 30,33 ****
--- 30,36 ----
/**
+ * This is a ITable decorator that provide a sorted view of the decorated table.
+ * This implementation does not keep a separate copy of the decorated table data.
+ *
* @author Manuel Laflamme
* @version $Revision$
***************
*** 70,77 ****
if (_indexes == null)
{
! _indexes = new Integer[getRowCount()];
for (int i = 0; i < _indexes.length; i++)
{
! _indexes[i] = new Integer(i);
}
--- 73,80 ----
if (_indexes == null)
{
! Integer[] indexes = new Integer[getRowCount()];
for (int i = 0; i < _indexes.length; i++)
{
! indexes[i] = new Integer(i);
}
***************
*** 84,87 ****
--- 87,92 ----
throw (DataSetException)e.getException();
}
+
+ _indexes = indexes;
}
|
|
From: <mla...@us...> - 2003-02-20 03:55:20
|
Update of /cvsroot/dbunit/./dbunit/src/java/org/dbunit/dataset
In directory sc8-pr-cvs1:/tmp/cvs-serv7621/dbunit/src/java/org/dbunit/dataset
Added Files:
SortedTable.java SortedDataSet.java
Log Message:
Added new SortedTable and SortedDataSet classes.
--- NEW FILE: SortedTable.java ---
/*
* DefaultTable.java Feb 19, 2003
*
* 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;
import org.dbunit.DatabaseUnitRuntimeException;
import org.dbunit.dataset.datatype.DataType;
import java.util.Arrays;
import java.util.Comparator;
/**
* @author Manuel Laflamme
* @version $Revision: 1.1 $
*/
public class SortedTable extends AbstractTable
{
private final ITable _table;
private final Column[] _columns;
private Integer[] _indexes;
/**
* Sort the decorated table by specified columns order.
*/
public SortedTable(ITable table, Column[] columns)
{
_table = table;
_columns = columns;
}
/**
* Sort the decorated table by specified metadata columns order. All
* metadata columns will be used.
*/
public SortedTable(ITable table, ITableMetaData metaData) throws DataSetException
{
this(table, metaData.getColumns());
}
/**
* Sort the decorated table by its own columns order. All
* table columns will be used.
*/
public SortedTable(ITable table) throws DataSetException
{
this(table, table.getTableMetaData());
}
private int getOriginalRowIndex(int row) throws DataSetException
{
if (_indexes == null)
{
_indexes = new Integer[getRowCount()];
for (int i = 0; i < _indexes.length; i++)
{
_indexes[i] = new Integer(i);
}
try
{
Arrays.sort(_indexes, new RowComparator());
}
catch (DatabaseUnitRuntimeException e)
{
throw (DataSetException)e.getException();
}
}
return _indexes[row].intValue();
}
////////////////////////////////////////////////////////////////////////////
// ITable interface
public ITableMetaData getTableMetaData()
{
return _table.getTableMetaData();
}
public int getRowCount()
{
return _table.getRowCount();
}
public Object getValue(int row, String column) throws DataSetException
{
assertValidRowIndex(row);
return _table.getValue(getOriginalRowIndex(row), column);
}
////////////////////////////////////////////////////////////////////////////
// Comparator interface
private class RowComparator implements Comparator
{
public int compare(Object o1, Object o2)
{
Integer i1 = (Integer)o1;
Integer i2 = (Integer)o2;
try
{
for (int i = 0; i < _columns.length; i++)
{
String columnName = _columns[i].getColumnName();
Object value1 = _table.getValue(i1.intValue(), columnName);
Object value2 = _table.getValue(i2.intValue(), columnName);
if (value1 == null && value2 == null)
{
continue;
}
if (value1 == null && value2 != null)
{
return -1;
}
if (value1 != null && value2 == null)
{
return 1;
}
String stringValue1 = DataType.asString(value1);
String stringValue2 = DataType.asString(value2);
int result = stringValue1.compareTo(stringValue2);
if (result != 0)
{
return result;
}
}
}
catch (DataSetException e)
{
throw new DatabaseUnitRuntimeException(e);
}
return 0;
}
}
}
--- NEW FILE: SortedDataSet.java ---
/*
* DefaultDataSet.java Feb 19, 2003
*
* 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;
/**
* @author Manuel Laflamme
* @version $Revision: 1.1 $
*/
public class SortedDataSet extends AbstractDataSet
{
private final ITable[] _tables;
public SortedDataSet(IDataSet dataSet) throws DataSetException
{
ITable[] tables = dataSet.getTables();
for (int i = 0; i < tables.length; i++)
{
tables[i] = new SortedTable(tables[i]);
}
_tables = tables;
}
////////////////////////////////////////////////////////////////////////////
// IDataSet interface
public ITable[] getTables() throws DataSetException
{
return cloneTables(_tables);
}
}
|
|
From: <mla...@us...> - 2003-02-20 03:55:20
|
Update of /cvsroot/dbunit/./dbunit/src/test/org/dbunit/dataset
In directory sc8-pr-cvs1:/tmp/cvs-serv7621/dbunit/src/test/org/dbunit/dataset
Modified Files:
AllTests.java
Added Files:
SortedTableTest.java SortedDataSetTest.java
Log Message:
Added new SortedTable and SortedDataSet classes.
--- NEW FILE: SortedTableTest.java ---
/*
* XmlTableTest.java Feb 19, 2003
*
* 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;
import org.dbunit.dataset.*;
import org.dbunit.dataset.xml.FlatXmlDataSet;
import java.io.File;
/**
* @author Manuel Laflamme
* @version $Revision: 1.1 $
*/
public class SortedTableTest extends AbstractTableTest
{
public SortedTableTest(String s)
{
super(s);
}
protected ITable createTable() throws Exception
{
return createDataSet().getTable("TEST_TABLE");
}
protected IDataSet createDataSet() throws Exception
{
return new SortedDataSet(new FlatXmlDataSet(
new File("src/xml/sortedTableTest.xml")));
}
public void testGetMissingValue() throws Exception
{
String columnName = "COLUMN2";
Object[] expected = {null, null, null, "0", "1"};
ITable table = createDataSet().getTable("MISSING_VALUES");
Column[] columns = table.getTableMetaData().getColumns();
assertEquals("column count", 3, columns.length);
assertEquals("row count", 5, table.getRowCount());
for (int i = 0; i < table.getRowCount(); i++)
{
assertEquals("value row " + i, expected[i],
table.getValue(i, columnName));
}
}
}
--- NEW FILE: SortedDataSetTest.java ---
/*
* FilteredDataSetTest.java Feb 19, 2003
*
* 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;
import org.dbunit.dataset.xml.XmlDataSet;
import org.dbunit.dataset.xml.FlatXmlDataSet;
import java.io.FileInputStream;
import java.io.FileReader;
/**
* @author Manuel Laflamme
* @version $Revision: 1.1 $
*/
public class SortedDataSetTest extends AbstractDataSetTest
{
public SortedDataSetTest(String s)
{
super(s);
}
protected IDataSet createDataSet() throws Exception
{
IDataSet dataSet = new FlatXmlDataSet(
new FileReader("src/xml/sortedDataSetTest.xml"));
return new SortedDataSet(dataSet);
}
protected IDataSet createDuplicateDataSet() throws Exception
{
IDataSet dataSet = new XmlDataSet(
new FileReader("src/xml/xmlDataSetDuplicateTest.xml"));
return new SortedDataSet(dataSet);
}
}
Index: AllTests.java
===================================================================
RCS file: /cvsroot/dbunit/./dbunit/src/test/org/dbunit/dataset/AllTests.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** AllTests.java 16 Feb 2003 06:01:00 -0000 1.10
--- AllTests.java 20 Feb 2003 03:55:17 -0000 1.11
***************
*** 51,54 ****
--- 51,56 ----
suite.addTest(new TestSuite(LowerCaseDataSetTest.class));
suite.addTest(new TestSuite(LowerCaseTableMetaDataTest.class));
+ suite.addTest(new TestSuite(SortedDataSetTest.class));
+ suite.addTest(new TestSuite(SortedTableTest.class));
return suite;
|
|
From: <mla...@us...> - 2003-02-20 03:55:19
|
Update of /cvsroot/dbunit/./dbunit/src/xml In directory sc8-pr-cvs1:/tmp/cvs-serv7621/dbunit/src/xml Added Files: sortedTableTest.xml sortedDataSetTest.xml Log Message: Added new SortedTable and SortedDataSet classes. --- NEW FILE: sortedTableTest.xml --- <!DOCTYPE dataset SYSTEM "../dtd/flatXmlTableTest.dtd"> <dataset> <TEST_TABLE COLUMN0="row 4 col 0" COLUMN1="row 4 col 1" COLUMN2="row 4 col 2" COLUMN3="row 4 col 3"/> <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 2 col 0" COLUMN1="row 2 col 1" COLUMN2="row 2 col 2" COLUMN3="row 2 col 3"/> <TEST_TABLE COLUMN0="row 1 col 0" COLUMN1="row 1 col 1" COLUMN2="row 1 col 2" COLUMN3="row 1 col 3"/> <TEST_TABLE COLUMN0="row 5 col 0" COLUMN1="row 5 col 1" COLUMN2="row 5 col 2" COLUMN3="row 5 col 3"/> <TEST_TABLE COLUMN0="row 3 col 0" COLUMN1="row 3 col 1" COLUMN2="row 3 col 2" COLUMN3="row 3 col 3"/> <MISSING_VALUES /> <MISSING_VALUES COLUMN0="0" COLUMN2="1"/> <MISSING_VALUES /> <MISSING_VALUES COLUMN0="0" COLUMN2="0"/> <MISSING_VALUES /> </dataset> --- NEW FILE: sortedDataSetTest.xml --- <!-- edited with XML Spy v4.1 U (http://www.xmlspy.com) by Stephane Besson (R&D) --> <dataset> <TEST_TABLE COLUMN0="row 5 col 0" COLUMN1="row 5 col 1" COLUMN2="row 5 col 2" COLUMN3="row 5 col 3"/> <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 3 col 0" COLUMN1="row 3 col 1" COLUMN2="row 3 col 2" COLUMN3="row 3 col 3"/> <TEST_TABLE COLUMN0="row 1 col 0" COLUMN1="row 1 col 1" COLUMN2="row 1 col 2" COLUMN3="row 1 col 3"/> <TEST_TABLE COLUMN0="row 4 col 0" COLUMN1="row 4 col 1" COLUMN2="row 4 col 2" COLUMN3="row 4 col 3"/> <TEST_TABLE COLUMN0="row 2 col 0" COLUMN1="row 2 col 1" COLUMN2="row 2 col 2" COLUMN3="row 2 col 3"/> <SECOND_TABLE COLUMN0="row 5 col 0" COLUMN1="row 5 col 1" COLUMN2="row 5 col 2" COLUMN3="row 5 col 3"/> <SECOND_TABLE COLUMN0="row 0 col 0" COLUMN1="row 0 col 1" COLUMN2="row 0 col 2" COLUMN3="row 0 col 3"/> <SECOND_TABLE COLUMN0="row 4 col 0" COLUMN1="row 4 col 1" COLUMN2="row 4 col 2" COLUMN3="row 4 col 3"/> <SECOND_TABLE COLUMN0="row 2 col 0" COLUMN1="row 2 col 1" COLUMN2="row 2 col 2" COLUMN3="row 2 col 3"/> <SECOND_TABLE COLUMN0="row 1 col 0" COLUMN1="row 1 col 1" COLUMN2="row 1 col 2" COLUMN3="row 1 col 3"/> <SECOND_TABLE COLUMN0="row 3 col 0" COLUMN1="row 3 col 1" COLUMN2="row 3 col 2" COLUMN3="row 3 col 3"/> <EMPTY_TABLE/> <PK_TABLE PK0="2" PK1="2" PK2="2" NORMAL0="row 2" NORMAL1="2 wor"/> <PK_TABLE PK0="0" PK1="0" PK2="0" NORMAL0="row 0" NORMAL1="0 wor"/> <PK_TABLE PK0="1" PK1="1" PK2="1" NORMAL0="row 1" NORMAL1="1 wor"/> <ONLY_PK_TABLE/> <EMPTY_MULTITYPE_TABLE/> </dataset> |
|
From: <mla...@us...> - 2003-02-19 21:45:42
|
Update of /cvsroot/dbunit/dbunit/src/java/org/dbunit/operation
In directory sc8-pr-cvs1:/tmp/cvs-serv11916/src/java/org/dbunit/operation
Modified Files:
DeleteAllOperation.java
Log Message:
Fixed issue with case sensitive database.
Index: DeleteAllOperation.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/java/org/dbunit/operation/DeleteAllOperation.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** DeleteAllOperation.java 4 Aug 2002 01:07:13 -0000 1.12
--- DeleteAllOperation.java 19 Feb 2003 21:45:33 -0000 1.13
***************
*** 52,55 ****
--- 52,57 ----
throws DatabaseUnitException, SQLException
{
+ IDataSet databaseDataSet = connection.createDataSet();
+
IStatementFactory statementFactory = connection.getStatementFactory();
IBatchStatement statement = statementFactory.createBatchStatement(connection);
***************
*** 61,68 ****
for (int i = 0; i < tableNames.length; i++)
{
StringBuffer sqlBuffer = new StringBuffer(128);
sqlBuffer.append("delete from ");
sqlBuffer.append(DataSetUtils.getQualifiedName(
! connection.getSchema(), tableNames[i], true));
statement.addBatch(sqlBuffer.toString());
}
--- 63,75 ----
for (int i = 0; i < tableNames.length; i++)
{
+ // Use database table name. Required to support case sensitive database.
+ ITableMetaData databaseMetaData =
+ databaseDataSet.getTableMetaData(tableNames[i]);
+ String tableName = databaseMetaData.getTableName();
+
StringBuffer sqlBuffer = new StringBuffer(128);
sqlBuffer.append("delete from ");
sqlBuffer.append(DataSetUtils.getQualifiedName(
! connection.getSchema(), tableName, true));
statement.addBatch(sqlBuffer.toString());
}
|
|
From: <de...@us...> - 2003-02-18 21:51:26
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit/operation
In directory sc8-pr-cvs1:/tmp/cvs-serv2115
Modified Files:
DeleteAllOperationTest.java
Log Message:
Because the default dataSet.xml doesn't know about the extra tables created specifically for MSSQL server profile, there is the very nasty call to AbstractDataSetTest.removeExtraTestTables to get rid of extra tables. I think the oracle code would have failed as well. This fixes it in a icky way.
Index: DeleteAllOperationTest.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/operation/DeleteAllOperationTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** DeleteAllOperationTest.java 15 Feb 2003 05:42:42 -0000 1.11
--- DeleteAllOperationTest.java 18 Feb 2003 21:51:20 -0000 1.12
***************
*** 34,37 ****
--- 34,39 ----
/**
* @author Manuel Laflamme
+ * @author Eric Pugh
+ * @todo Refactor all the references to AbstractDataSetTest.removeExtraTestTables() to something better.
* @version $Revision$
*/
***************
*** 168,176 ****
}
private void testExecute(IDataSet dataSet) throws Exception
{
! ITable[] tablesBefore = DataSetUtils.getTables(_connection.createDataSet());
DatabaseOperation.DELETE_ALL.execute(_connection, dataSet);
! ITable[] tablesAfter = DataSetUtils.getTables(_connection.createDataSet());
assertTrue("table count > 0", tablesBefore.length > 0);
--- 170,185 ----
}
+ /* The AbstractDataSetTest.removeExtraTestTables() is required when you
+ run on something besides hypersone (like mssql or oracle) to deal with
+ the extra tables that may not have data.
+
+ Need something like getDefaultTables or something that is totally cross dbms.
+ */
private void testExecute(IDataSet dataSet) throws Exception
{
! //dataSet = dataSet);
! ITable[] tablesBefore = DataSetUtils.getTables(AbstractDataSetTest.removeExtraTestTables(_connection.createDataSet()));
DatabaseOperation.DELETE_ALL.execute(_connection, dataSet);
! ITable[] tablesAfter = DataSetUtils.getTables(AbstractDataSetTest.removeExtraTestTables(_connection.createDataSet()));
assertTrue("table count > 0", tablesBefore.length > 0);
|
|
From: <de...@us...> - 2003-02-18 21:49:44
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit/operation/mssqlserver
In directory sc8-pr-cvs1:/tmp/cvs-serv964
Modified Files:
InsertIdentityOperationTest.java
Log Message:
added bit of debug msg so I know when the mssql profile is actually working!
Index: InsertIdentityOperationTest.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/operation/mssqlserver/InsertIdentityOperationTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** InsertIdentityOperationTest.java 14 Feb 2003 03:22:02 -0000 1.4
--- InsertIdentityOperationTest.java 18 Feb 2003 21:49:37 -0000 1.5
***************
*** 39,42 ****
--- 39,43 ----
/**
* @author Manuel Laflamme
+ * @author Eric Pugh
* @version $Revision$
*/
***************
*** 58,61 ****
--- 59,63 ----
{
if (DatabaseEnvironment.getInstance() instanceof MSSQLServerEnvironment){
+ System.out.println("mssql");
Reader in = new FileReader("src/xml/insertIdentityOperationTest.xml");
IDataSet xmlDataSet = new XmlDataSet(in);
|
|
From: <de...@us...> - 2003-02-18 21:48:46
|
Update of /cvsroot/dbunit/dbunit/src/test/org/dbunit
In directory sc8-pr-cvs1:/tmp/cvs-serv354
Modified Files:
MSSQLServerEnvironment.java
Log Message:
Trying to get various extra tables to not show up in standard tests.
Index: MSSQLServerEnvironment.java
===================================================================
RCS file: /cvsroot/dbunit/dbunit/src/test/org/dbunit/MSSQLServerEnvironment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MSSQLServerEnvironment.java 13 Dec 2002 21:43:54 -0000 1.1
--- MSSQLServerEnvironment.java 18 Feb 2003 21:48:42 -0000 1.2
***************
*** 27,30 ****
--- 27,32 ----
import java.sql.Statement;
+ import org.dbunit.dataset.*;
+
/**
* @author Eric Pugh
***************
*** 66,69 ****
--- 68,84 ----
}
+ public IDataSet getInitDataSet() throws Exception
+ {
+ return super.getInitDataSet();
+ /*
+ ITable[] extraTables = {
+ new DefaultTable("CLOB_TABLE"),
+ new DefaultTable("BLOB_TABLE"),
+ };
+
+ return new CompositeDataSet(super.getInitDataSet(),
+ new DefaultDataSet(extraTables));
+ */
+ }
}
|
|
From: <mla...@us...> - 2003-02-16 17:41:18
|
Update of /cvsroot/dbunit/dbunit/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv27766/dbunit/docs
Modified Files:
anttask.html
Log Message:
Added <classpath> nested element in ant task. It is used to load the JDBC classes.
Index: anttask.html
===================================================================
RCS file: /cvsroot/dbunit/dbunit/docs/anttask.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** anttask.html 11 Dec 2002 15:52:47 -0000 1.3
--- anttask.html 16 Feb 2003 17:41:15 -0000 1.4
***************
*** 43,53 ****
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2>Ant Integration</h2>
<h3>Installation</h3>
! The steps required to add the DbUnit task to your system are:
<ol>
<li>Add the DbUnit jar to Ant's classpath. </li>
! <li>Add a <taskdef> element to your build script as follows:
<pre class=code><taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask"/></pre>
</li>
--- 43,53 ----
src="images/silphid.gif" border=0></a></div>
</td>
! <td class="body" valign="top"> <!-- #BeginEditable "body" -->
<h2>Ant Integration</h2>
<h3>Installation</h3>
! The steps required to add the DbUnit task to your system are:
<ol>
<li>Add the DbUnit jar to Ant's classpath. </li>
! <li>Add a <taskdef> element to your build script as follows:
<pre class=code><taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask"/></pre>
</li>
***************
*** 55,93 ****
</ol>
<h3>Usage </h3>
! <p>Executes either a single transaction, or a group of transactions, under
the DbUnit database testing framework.</p>
<h4>Parameters</h4>
<table border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>driver</td>
<td>Class name of the jdbc driver</td>
<td>Yes</td>
</tr>
! <tr>
<td>url</td>
<td>Database connection url</td>
<td>Yes</td>
</tr>
! <tr>
<td>userid</td>
<td>Database username</td>
<td>Yes</td>
</tr>
! <tr>
<td>password</td>
<td>Database password</td>
<td>Yes</td>
</tr>
! <tr>
<td>schema </td>
<td>Database schema</td>
<td>No</td>
</tr>
! <tr>
<td>useQualifiedTableNames</td>
<td>Set System.property dbunit.qualified.table.names <br>
--- 55,98 ----
</ol>
<h3>Usage </h3>
! <p>Executes either a single transaction, or a group of transactions, under
the DbUnit database testing framework.</p>
<h4>Parameters</h4>
<table border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>driver</td>
<td>Class name of the jdbc driver</td>
<td>Yes</td>
</tr>
! <tr>
<td>url</td>
<td>Database connection url</td>
<td>Yes</td>
</tr>
! <tr>
<td>userid</td>
<td>Database username</td>
<td>Yes</td>
</tr>
! <tr>
<td>password</td>
<td>Database password</td>
<td>Yes</td>
</tr>
! <tr>
<td>schema </td>
<td>Database schema</td>
<td>No</td>
</tr>
! <tr>
! <td>classpath</td>
! <td>Classpath used to load driver</td>
! <td>No (use system classpath)</td>
! </tr>
! <tr>
<td>useQualifiedTableNames</td>
<td>Set System.property dbunit.qualified.table.names <br>
***************
*** 95,99 ****
<td>No</td>
</tr>
! <tr>
<td>supportBatchStatement</td>
<td>Set System.property<br>
--- 100,104 ----
<td>No</td>
</tr>
! <tr>
<td>supportBatchStatement</td>
<td>Set System.property<br>
***************
*** 105,121 ****
<h4>Parameters specified as nested elements</h4>
<table cellspadding = 0 border = 1 >
! <tr>
<td>operation</td>
! <td>
! <p>Use nested <operation> elements to specify which DbUnit operation
to perform on the particular file. <br>
</p>
<table border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>type</td>
<td>Type of Database operation to perform. Supported types are<br>
--- 110,134 ----
<h4>Parameters specified as nested elements</h4>
<table cellspadding = 0 border = 1 >
! <tr>
! <td>classpath</td>
! <td>
! <p>DbUnit's classpath attribute is a PATH like structure and can also
! be set via a nested classpath element. It is used to load the JDBC
! classes.</p>
! </td>
! </tr>
! <tr>
<td>operation</td>
! <td>
! <p>Use nested <operation> elements to specify which DbUnit operation
to perform on the particular file. <br>
</p>
<table border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>type</td>
<td>Type of Database operation to perform. Supported types are<br>
***************
*** 126,139 ****
<td>Yes</td>
</tr>
! <tr>
<td>src</td>
<td>The xml source upon which the operation is to be performed</td>
<td>Yes</td>
</tr>
! <tr>
<td>format</td>
! <td>Format type of supplied source file. Possible values are "flat"
or "xml". Defaults to <a class="code">"flat"</a></td>
! <td>
<p>No</p>
</td>
--- 139,152 ----
<td>Yes</td>
</tr>
! <tr>
<td>src</td>
<td>The xml source upon which the operation is to be performed</td>
<td>Yes</td>
</tr>
! <tr>
<td>format</td>
! <td>Format type of supplied source file. Possible values are "flat"
or "xml". Defaults to <a class="code">"flat"</a></td>
! <td>
<p>No</p>
</td>
***************
*** 183,213 ****
</tr>
-->
! <tr>
<td>export</td>
! <td>
! <p>Use nested <a class="code"><export></a> operation elements
! to export the database to the supplied filename. The default operation
! is to <a class="code"><export></a> the entire database to
! the destination filename with the supplied dataset type. You can
specify individual tables or queries to<br>
! <a class="code"><export></a> by nesting them under the <export>
step.</p>
<table width="100%" border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>dest</td>
<td>The xml destination filename</td>
<td>Yes</td>
</tr>
! <tr>
<td>format</td>
! <td>Format type of supplied destination file. Possible values
! are "flat", "xml" or "dtd". Defaults
to <a class="code">"flat"</a></td>
! <td>
<p>No</p>
</td>
--- 196,226 ----
</tr>
-->
! <tr>
<td>export</td>
! <td>
! <p>Use nested <a class="code"><export></a> operation elements
! to export the database to the supplied filename. The default operation
! is to <a class="code"><export></a> the entire database to
! the destination filename with the supplied dataset type. You can
specify individual tables or queries to<br>
! <a class="code"><export></a> by nesting them under the <export>
step.</p>
<table width="100%" border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>dest</td>
<td>The xml destination filename</td>
<td>Yes</td>
</tr>
! <tr>
<td>format</td>
! <td>Format type of supplied destination file. Possible values
! are "flat", "xml" or "dtd". Defaults
to <a class="code">"flat"</a></td>
! <td>
<p>No</p>
</td>
***************
*** 216,231 ****
<h4>Parameters specified as nested elements </h4>
<table border="1">
! <tr>
<td>table</td>
! <td>
! <p>Use nested <a class=code><table></a> elements to <a class=code><export></a>
specific tables. </p>
<table border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>name</td>
<td>Name of the database table to export.</td>
--- 229,244 ----
<h4>Parameters specified as nested elements </h4>
<table border="1">
! <tr>
<td>table</td>
! <td>
! <p>Use nested <a class=code><table></a> elements to <a class=code><export></a>
specific tables. </p>
<table border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>name</td>
<td>Name of the database table to export.</td>
***************
*** 235,257 ****
</td>
</tr>
! <tr>
<td>query</td>
! <td>
! <p>Use nested <a class=code><query></a> elements to <a class=code><export></a>
data according to a sql statement. </p>
! <table border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>name</td>
<td>Name to reference the sql statement.</td>
<td>No</td>
</tr>
! <tr>
<td>sql</td>
! <td>The sql to execute. You can use either SELECT * from Mytable or SELECT col1, col4 from MyTable</td>
<td>No</td>
</tr>
--- 248,271 ----
</td>
</tr>
! <tr>
<td>query</td>
! <td>
! <p>Use nested <a class=code><query></a> elements to <a class=code><export></a>
data according to a sql statement. </p>
! <table border="1">
! <tr>
<td><b>Attribute</b></td>
<td><b>Description</b></td>
<td><b>Required</b></td>
</tr>
! <tr>
<td>name</td>
<td>Name to reference the sql statement.</td>
<td>No</td>
</tr>
! <tr>
<td>sql</td>
! <td>The sql to execute. You can use either SELECT * from
! Mytable or SELECT col1, col4 from MyTable</td>
<td>No</td>
</tr>
***************
*** 264,280 ****
</table>
<h3>Examples</h3>
! <pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <operation type="UPDATE" src="updateFile.xml"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and executes the UPDATE operation contained within the FlatXmlDataSet
! file updateFile.xml.</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <operation type="INSERT" src="insertFile.xml"/><br> <operation type="UPDATE" src="updateFile.xml"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver.
! It then executes the INSERT operation contained within the FlatXmlDataSet
file insertFile.xml <br>
! followed by the execution of the UPDATE operation contained within the
FlatXmlDataSet file updateFile.xml.</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <operation type="UPDATE" src="updateFile.xml" flat="false"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and executes the UPDATE operation contained within the XmlDataSet file
updateFile.xml.</p>
<!--
--- 278,296 ----
</table>
<h3>Examples</h3>
! <pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password="">
! <classpath><br> <pathelement location="/some/jdbc.jar"><br> </classpath><br> <operation type="UPDATE" src="updateFile.xml"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver,
! searching it from /some/jdbc.jar as well from the system classpath, and
! executes the UPDATE operation contained within the FlatXmlDataSet file
! updateFile.xml.</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <operation type="INSERT" src="insertFile.xml"/><br> <operation type="UPDATE" src="updateFile.xml"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver.
! It then executes the INSERT operation contained within the FlatXmlDataSet
file insertFile.xml <br>
! followed by the execution of the UPDATE operation contained within the
FlatXmlDataSet file updateFile.xml.</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <operation type="UPDATE" src="updateFile.xml" flat="false"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and executes the UPDATE operation contained within the XmlDataSet file
updateFile.xml.</p>
<!--
***************
*** 289,315 ****
-->
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="exportFile.xml"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and exports the database to the given destination file as a FlatXmlDataSet.
</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="exportNonFlatFile.xml" format="xml"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and exports the database to the given destination file as an XmlDataSet.
</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="export.dtd" format="dtd"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
and <br>
exports the document type definition (dtd) describing the flat xml format.</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="exportFile.xml"><br> <table name="FOO"/><br> <table name="BAR"/><br> </export><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and exports the contents of the provided tables to the given destination
file as an FlatXmlDataSet. <br>
</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="exportFile.xml"><br> <table name="FOO"/><br> <query name="BAR" sql="SELECT COL1, COL2, COL3 as 'COLSPECIAL' FROM BAR WHERE COL1=4"/><br> </export><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and exports the contents of the provided tables to the given destination file as an FlatXmlDataSet. The contents
! of the BAR table are only shown where col1 is equal to 4. Col3 is renamed COLSPECIAL as well.
! <br>
</p>
! <!-- #EndEditable -->
<hr>
<div align="center">
--- 305,331 ----
-->
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="exportFile.xml"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and exports the database to the given destination file as a FlatXmlDataSet.
</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="exportNonFlatFile.xml" format="xml"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and exports the database to the given destination file as an XmlDataSet.
</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="export.dtd" format="dtd"/><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
and <br>
exports the document type definition (dtd) describing the flat xml format.</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="exportFile.xml"><br> <table name="FOO"/><br> <table name="BAR"/><br> </export><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and exports the contents of the provided tables to the given destination
file as an FlatXmlDataSet. <br>
</p>
<pre> <dbunit driver="org.hsqldb.jdbcDriver"<br> url="jdbc:hsqldb:."<br> userid="sa"<br> password=""><br> <export dest="exportFile.xml"><br> <table name="FOO"/><br> <query name="BAR" sql="SELECT COL1, COL2, COL3 as 'COLSPECIAL' FROM BAR WHERE COL1=4"/><br> </export><br> </dbunit></pre>
! <p> Connects to the database given in url as the dbunit user using the org.hsqldb.jdbcDriver
! and exports the contents of the provided tables to the given destination
! file as an FlatXmlDataSet. The contents of the BAR table are only shown
! where col1 is equal to 4. Col3 is renamed COLSPECIAL as well. <br>
</p>
! <!-- #EndEditable -->
<hr>
<div align="center">
|