📄 clienttest.java
字号:
/*
* Created on 2006-6-23
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.funddeal.test;
//import java.util.Calendar;
//import java.util.Iterator;
//import java.util.List;
import com.funddeal.model.dao.client.ClieatDAO;
import com.funddeal.model.pojo.client.Client;
import junit.framework.TestCase;
//import java.util.Calendar;
import net.sf.hibernate.HibernateException;
/**
* @author Administrator
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class ClientTest extends TestCase {
ClieatDAO clientDAO=null;
/*
* @see TestCase#setUp()
*/
protected void setUp() throws Exception {
super.setUp();
clientDAO=new ClieatDAO();
}
/*
* @see TestCase#tearDown()
*/
protected void tearDown() throws Exception {
super.tearDown();
}
/*public void testAddClient(){
Client client=new Client();
client.setClient_no("zhou11");
client.setClient_name("zhou");
client.setId_card_no("452156487545");
client.setSex("男");
client.setPhone("13845687542");
client.setAddess("fdsghjofgdihfd");
client.setEmail("zhj8131@163.com");
client.setHobby("fhdofjdsogofr");
client.setCreated_date(Calendar.getInstance());
try {
clientDAO.addClieat(client);
} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}*/
/*public void testUpdateClient(){
Client client=new Client();
client.setClient_id("402881540c0f4678010c0f467c3a0001");
client.setClient_no("zhou11");
client.setClient_name("jin");
client.setId_card_no("452156487545");
client.setSex("女");
client.setPhone("13845687542");
client.setAddess("fdsghjofgdihfd");
client.setEmail("zhj8131@163.com");
client.setHobby("fhdofjdsogofr");
client.setCreated_date(Calendar.getInstance());
try {
if(clientDAO.UpdateClient(client))
System.out.println("Update ok!");
} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}*/
/*public void testExistClient(){
Client client=new Client();
client.setClient_no("zhou11");
try {
if(clientDAO.existClient(client)){
List str=clientDAO.ClientAll(client);
System.out.println();
}
} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
*/
/*查询单个客户*/
public void testQueryClient(){
try {
Client client = clientDAO.queryClient("2","zhou11");
System.out.println(client.getAddess());
System.out.println(client.getClientId());
} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//查询全部客户
/*public void testQueryAllClient(){
try {
List list = clientDAO.queryClient();
Iterator it = list.iterator();
while(it.hasNext()){
Client client = (Client)it.next();
System.out.println(client.getAddess());
System.out.println(client.getClient_id());
}
} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -