supplydaotest.java
来自「老牌java开发的物流管理系统 详细的我也没有怎么看 好像是恒基的」· Java 代码 · 共 44 行
JAVA
44 行
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 + =
减小字号Ctrl + -
显示快捷键?