⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 howto.html

📁 dfdfddfskfjdsklfjksdljflksjfsjlkfdjlksfjkdsjfsdjkflsjkf
💻 HTML
📖 第 1 页 / 共 2 页
字号:
                                                                                                                                                                                           		              			<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">    <html>      <head>                          <title>            DbUnit -           Getting Started                  </title>                                <style type="text/css">          @import url("./style/tigris.css");          @import url("./style/maven.css");        </style>                                                <link rel="stylesheet" href="./style/print.css" type="text/css" media="print"></link>        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta>                                      </head>      <body class="composite">        <div id="banner">          <table border="0" width="100%" cellpadding="8" cellspacing="0">            <tr>                            <td>                                                                                                                                                                                                                      <a href="http://www.sourceforge.net/projects/dbunit">                    <img border="0" alt="DbUnit.org" src="http://sourceforge.net/sflogo.php?group_id=47439&amp;type=5" align="left"></img>                  </a>                              </td>                            <td>                <div id="login" align="right">                                                                                                                                                              <a href="http://www.dbunit.org">                      <img border="0" alt="DbUnit" src="./images/dbunit-logo.jpg" align="right"></img>                    </a>                                  </div>              </td>            </tr>          </table>        </div>        <div id="breadcrumbs">          <table border="0" width="100%" cellpadding="4" cellspacing="0">            <tr>                                              <td>Last published: 31 May 2004                  | Doc for 2.1                </td>                            <td>                <div align="right">                                                                                                          <a href="http://www.dbunit.org/wiki/"><img class="handle" src="./images/none.png" alt=""></img>Wiki</a>                |                  <a href="http://www.sf.net/projects/dbunit"><img class="handle" src="./images/none.png" alt=""></img>SF.net Project Page</a>                |                  <a href="http://maven-plugins.sourceforge.net/maven-dbunit-plugin/index.html"><img class="handle" src="./images/none.png" alt=""></img>Maven Plugin</a>                                                                </div>              </td>            </tr>          </table>        </div>                <table border="0" width="100%" cellpadding="8" cellspacing="0">           <tr valign="top">            <td width="20%" id="leftcol">              <div id="navcolumn">                                                      <div>      <strong>Quick Links</strong>                      							   	    <div>      <small>      	      	      		<a href="http://sourceforge.net/project/showfiles.php?group_id=47439&amp;release_id=211888"><img class="handle" src="./images/none.png" alt=""></img>Download</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="changes-report.html"><img class="handle" src="./images/none.png" alt=""></img>Changes</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="faq.html"><img class="handle" src="./images/none.png" alt=""></img>FAQ</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="https://sourceforge.net/support/getsupport.php?group_id=47439"><img class="handle" src="./images/none.png" alt=""></img>Get Support</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="http://www.dbunit.org/wiki/"><img class="handle" src="./images/none.png" alt=""></img>Wiki</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="cvs-usage.html"><img class="handle" src="./images/none.png" alt=""></img>Source</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="apidocs/index.html"><img class="handle" src="./images/none.png" alt=""></img>JavaDocs</a>      	      </small>	                    </div>      </div>      <div>      <strong>Overview</strong>                      							   	    <div>      <small>      	      	      		<a href="index.html"><img class="handle" src="./images/none.png" alt=""></img>About DbUnit</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="intro.html"><img class="handle" src="./images/none.png" alt=""></img>Database Testing</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      		<b><a href="howto.html"><img class="handle" src="./images/none.png" alt=""></img>Getting Started</a></b>      	      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="bestpractices.html"><img class="handle" src="./images/none.png" alt=""></img>Best Practices</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="components.html"><img class="handle" src="./images/none.png" alt=""></img>Core Components</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="properties.html"><img class="handle" src="./images/none.png" alt=""></img>Properties</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="anttask.html"><img class="handle" src="./images/none.png" alt=""></img>Ant Task</a>      	      </small>	                    </div>                  							   	    <div>      <small>      	      	      		<a href="resources.html"><img class="handle" src="./images/none.png" alt=""></img>Resources</a>      	      </small>	                    </div>      </div>                  				    <div>      <strong>Project Documentation</strong>                      							   	    <div>      <small>      	      	      		<a href="index.html"><img class="handle" src="./images/none.png" alt=""></img>About DbUnit</a>      	      </small>	                    </div>                  									          					   	    <div>      <small>      	      	      		<a href="project-info.html"><img class="handle" src="./images/collapsed.png" alt=""></img>Project Info</a>      	      </small>	      </div>                  									          					   	    <div>      <small>      	      	      		<a href="maven-reports.html"><img class="handle" src="./images/collapsed.png" alt=""></img>Project Reports</a>      	      </small>	      </div>                  							   	    <div>      <small>      	      	      		<a href="http://maven.apache.org/development-process.html"><img class="handle" src="./images/none.png" alt=""></img>Development Process</a>      	      </small>	                    </div>      </div>                                                                                                                                  	<div style="margin-top: 20px; width: 100%; text-align: center;">                		<a href="http://maven.apache.org/" title="Powered by Maven"><img style="border: 1px solid black" alt="Powered by Maven" src="./images/logos/maven-propaganda.png"></img></a>                	</div>                                                            </div>            </td>            <td rowspan="2">              <div id="bodycol">                                <div class="app">                                        <div class="h3">                      <h3>           Getting Started       </h3>       <ol>          <li>          <a href="#createtest">             Database setup with DatabaseTestCase subclass                 </a>      </li>                     <li>          <a href="#noextend">             Database setup with your own TestCase subclass                 </a>      </li>                     <li>          <a href="#assertdata">             Database data verification                 </a>      </li>                     <li>          <a href="#canoo">             DbUnit Ant task and Canoo WebTest                  </a>      </li>       </ol>       <a name="createtest">                  <h3>           Database setup with DatabaseTestCase subclass       </h3>                 </a>      <a name="createdataset">    <h4>           Step 1: Create your dataset file       </h4>   </a>      <p>           Your test 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 a        <a href="components.html#FlatXmlDataSet">     flat XML dataset   </a>                      from scratch or create one by        <a href="faq.html#extract">     exporting   </a>             some data from your database.                     </p>       <h4>           Step 2: Extend the DatabaseTestCase class       </h4>       <p>           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        

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -