📄 supplydaotest.java
字号:
package com.wl.test;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import junit.framework.TestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.wl.dao.SupplyDAO;
import com.wl.entity.Supply;
/**
*
* @author wangJianwei
*
*/
public class SupplyDAOTest extends TestCase{
SupplyDAO dao = new SupplyDAO();
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
@Test
public void testSuppleyDAO(){
//测试插入方法
Supply s = new Supply(1, "ee","ww","ee","ee","ee","ee","ee","ee", "aa");
Assert.assertEquals(true, dao.insertSuppley(s));
//测试查询方法
SupplyDAO sdao= new SupplyDAO();
List<Supply> list = new ArrayList<Supply>();
list = null;
list=sdao.querySupply();
Assert.assertEquals(true, list!=null);
//测试删除方法
Assert.assertEquals(true, dao.deleteSupplyId(4));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -