testemploydao.java~2~
来自「数据库应用程序.它比较全面的含盖了JAVA应用程序与数据库之间通讯的全过程.本程」· JAVA~2~ 代码 · 共 31 行
JAVA~2~
31 行
package chapter25.db;
import junit.framework.*;
import fixture.*;
import java.sql.*;
public class TestEmployDAO extends TestCase {
private EmployDAO employDAO = null;
HrJdbcFixture hrJdbcFixture;
protected void setUp() throws Exception {
super.setUp();
hrJdbcFixture = new HrJdbcFixture(this);
employDAO = new EmployDAO(hrJdbcFixture.getConnection());
hrJdbcFixture.setUp();
}
protected void tearDown() throws Exception {
employDAO = null;
hrJdbcFixture.tearDown();
hrJdbcFixture = null;
super.tearDown();
}
public void testFindById() throws SQLException {
String id = "";
Employ expectedReturn = null;
Employ actualReturn = employDAO.findById(id);
assertEquals("return value", expectedReturn, actualReturn);
/**@todo fill in the test code*/
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?