📄 commcatetest.java
字号:
package com.wl.test;
/**
* 封装商品分类信息!
*/
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.wl.dao.GoodsTypeDAO;
import com.wl.entity.GoodsType;
/**
*
* @author tianxiaoshun
*
*/
public class CommcateTest {
GoodsTypeDAO commcatedao;
@Before
public void setUp() throws Exception {
commcatedao=new GoodsTypeDAO();
}
@After
public void tearDown() throws Exception {
}
@Test
public void testInsertCommcate() {
//测试插入商品分类方法
GoodsType commcate=new GoodsType("ss","tian");
Assert.assertEquals(true,commcatedao.insertCommcate(commcate));
//测试查询所有分类方法
List<GoodsType> list=new ArrayList<GoodsType>();
list=null;
list=commcatedao.selectCommcate();
Assert.assertEquals(true,list!=null);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -