zTree市县实现三个梯级DAO接口测试

时间:2021-05-19 19:24:26

zTree市县实现三个梯级DAO接口测试

ProvinceDaoTest.java:

/**
* @Title:ProvinceDaoTest.java
* @Package:com.gwtjs.dao
* @Description:省份地市县级三级级联DAO接口測试
* @author:Youhaidong(游海东)
* @date:2014-5-10 下午11:13:43
* @version V1.0
*/
package com.gwtjs.dao; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue; import java.util.ArrayList;
import java.util.List; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import com.gwtjs.SpringTestBase;
import com.gwtjs.model.Province; /**
* 类功能说明
* 类改动者 改动日期
* 改动说明
* <p>Title:ProvinceDaoTest.java</p>
* <p>Description:游海东个人开发</p>
* <p>Copyright:Copyright(c)2013</p>
* @author:游海东
* @date:2014-5-10 下午11:13:43
* @version V1.0
*/
public class ProvinceDaoTest extends SpringTestBase
{
@Autowired
private ProvinceDao provinceDao; /**
* @author YouHaidong
* @date 2014-05-10
* @description 測试ProvinceDao非空
*/
@Test
@Override
public void testNotNull()
{
assertNotNull(provinceDao);
assertTrue(null != provinceDao);
} /**
* @author YouHaidong
* @date 2014-05-10
* @description 測试ProvinceDao非空
*/
@Test
public void testFindArea()
{
String provinceCode = "";
String cityCode = "";
String countyCode = "";
List<Province> list = new ArrayList<Province>();
list = provinceDao.findArea(provinceCode, cityCode, countyCode);
System.out.println("Dao測试查询出的数据的条数:" + list.size());
}
}

版权声明:本文博客原创文章,博客,未经同意,不得转载。