@isTest
public with sharing class Dealer_enquiryControllerTest2 {
    @IsTest(SeeAllData=true) static void test1(){
        PageReference page = new PageReference('/apex/Dealer_enquiryCopy');
        System.Test.setCurrentPage(page);
        Dealer_enquiryController controller = new Dealer_enquiryController();
        controller.init();
        controller.accSearch = '宁波';
        controller.aooSearch = '李林';
        controller.numtext1 = 'Change_To_Opportunity__r.Name';
        controller.numtext = '宫腔镜 :';
        controller.numtext2 = 'contains';
        controller.timetext1 = 'Created_Day__c';
        controller.chick();
        controller.numtext1 = 'Change_To_Opportunity__r.Name';
        controller.numtext = '宫腔镜,:';
        controller.numtext2 = '=';
        controller.save();
        controller.sortTable();
        controller.numtext = '宫腔镜';
        controller.numtext2 = 'contains';
        //开始日期与结束日期都存在  start
        controller.tmpAO.MaxActivityDate__c = date.valueOf('2022-11-11');
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-1');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-1');
        controller.chick();
        controller.numtext = '宫腔镜';
        controller.numtext2 = '=';
        controller.tmpAO.MaxActivityDate__c = date.valueOf('2022-10-1');
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-1');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-1');
        controller.chick();
        controller.numtext2 = 'starts with';
        controller.tmpAO.MaxActivityDate__c = date.valueOf('2022-9-11');
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-1');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-1');
        controller.chick();
        controller.numtext2 = '<';
        controller.tmpAO.MaxActivityDate__c = date.valueOf('2022-1-1');
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-1');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-1');
        controller.chick();
        //开始日期与结束日期都存在  end
        controller.numtext2 = 'notcontains';
        //开始日期存在 start
        controller.tmpAO.MaxActivityDate__c = date.valueOf('2022-11-11');
        controller.tmpBO.MaxActivityDate__c = null;
        controller.chick();
        controller.tmpAO.MaxActivityDate__c = date.valueOf('2022-10-1');
        controller.chick();
        controller.tmpAO.MaxActivityDate__c = date.valueOf('2022-9-11');
        controller.chick();
        controller.tmpAO.MaxActivityDate__c = date.valueOf('2022-1-1');
        controller.chick();
        //开始日期存在 end
        //结束日期存在 start
        controller.tmpAO.MaxActivityDate__c = null;
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-11-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-10-1');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-9-11');
        controller.chick();
        controller.tmpBO.MaxActivityDate__c = date.valueOf('2022-1-1');
        controller.chick();
        controller.sortKey = null;
        controller.chick();

        //结束日期存在 end
    }
}