高章伟
2022-02-18 8b5f4c6c281cfa548f92de52c8021e37aa81901e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@isTest
private class DataBasePlusTest extends BaseController{
    static testMethod void testMethod1() {
        // DataBasePlus.ControllerUtil();
        List<SObjectField> sObjectFieldList  = new List<SObjectField>();
        DataBasePlus datbasplus=new DataBasePlus();
        QueryWrapper query = new QueryWrapper(PromotionHead__c.SObjectType);
        Schema.DescribeSobjectResult d = PromotionHead__c.sObjectType.getDescribe();
        Map<String,Schema.SObjectField> mfields = d.fields.getMap();
        for(String strField:mfields.keySet()) {
            SObjectField fl = mfields.get(strField);
            if(fl!=null){
                sObjectFieldList.add(fl);
            }
        }
        query.setSObjectFieldList(sObjectFieldList);
        DataBasePlus.getOne(query,true);
        DataBasePlus.listPlus(query);
        QuoteTrialService prDao = new QuoteTrialService();
        Integer page = 1;
        Integer pageLimit = 3;
        String search = '%7B%22NameInDate%22:%222019%22,%22PromotionNo__cEqual%22:%22123%22%7D';
        String sortOrder = '';
        String sortPlus = 'Id';
        String[] arr = new String[] {'PromotionNo__cEqual','NameInDate'}; 
        String Agency1c = '123456';
        PagePlus pages = prDao.GetPromotionPromotionSearchFn(page,pageLimit,search,sortOrder,sortPlus,arr);  
        
    }
}