presidentsdaotest.java

来自「j2ee开发优秀的表格控件」· Java 代码 · 共 43 行

JAVA
43
字号
package org.extremesite.dao;import junit.framework.TestCase;public class PresidentsDaoTest extends TestCase {    public void testFilterQuery() {//        PresidentsDao presidentsDao = new PresidentsDao();////        String presidentsQuery = presidentsDao.getPresidentsQuery();////        Filter filter = new Filter("fullName", "e");////        FilterSet filterSet = new FilterSet(TableConstants.FILTER_ACTION, new Filter[] { filter });////        String filteredQuery = null; //DaoUtils.filterQuery(presidentsDao, filterSet, presidentsQuery);////        assertTrue("The filters work ", StringUtils.contains(filteredQuery, " AND concat(first_name, ' ',last_name) like"));    }    public void testSortQuery() {//        PresidentsDao presidentsDao = new PresidentsDao();////        String presidentsQuery = presidentsDao.getPresidentsQuery();////        Sort sort = new Sort("fullName", TableConstants.SORT_ASC);////        String sortedQuery = null; //DaoUtils.sortQuery(presidentsDao, sort, presidentsQuery, presidentsDao.getDefaultSortOrder());////        assertTrue("The sorting work ", StringUtils.contains(sortedQuery, "ORDER BY concat(first_name, ' ',last_name) asc"));    }    public void testSectionQuery() {//        PresidentsDao presidentsDao = new PresidentsDao();////        String presidentsQuery = presidentsDao.getPresidentsQuery();////        String sectionQuery = presidentsDao.limitQuery(15, presidentsQuery);////        assertTrue("The sections work ", sectionQuery.startsWith(" set rowcount"));    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?