@isTest
public with sharing class LexCommitNeedApprovalControllerTest {
    static testMethod void testMethod1() {
        RecordType rectCam =
	    [select Id from RecordType
	     where IsActive = true and SobjectType = 'Campaign'
	                      and DeveloperName = 'ServiceEngineerTraining'];

		Campaign cam = new Campaign();
		cam.Name = 'camTest';
		cam.Name2__c = '1234Test';
		cam.RecordTypeId = rectCam.Id;
		cam.StartDate = Date.today().addDays(-15);
		cam.EndDate = Date.today().addDays(18);
		cam.Mailflg_after45__c = true;
		cam.Mailflg_cancel__c = true;
		cam.Mailflg_before15__c = true;
		cam.Mailflg_before7__c = true;
		cam.Mailflg_after3__c = true;
		cam.Status = '申请中';
		insert cam;

        //需要一个meetings 的对象集合
        meeting_delay_apply__c m = new meeting_delay_apply__c();
        m.Meeting_Type__c = '共同主办会';
        m.HostName__c = '主办方Test';
        m.cooperatorCompany__c = '承办方Test';
        m.status__c = '草案中';
        m.campaign__c = cam.Id;
        insert m;
        LexCommitNeedApprovalController.init(m.Id);
        LexCommitNeedApprovalController.init('xxx72727');
        LexCommitNeedApprovalController.newUpdateMeetingDelayApply(m.Id);
        LexCommitNeedApprovalController.newUpdateMeetingDelayApply('xcacxc');
        LexCommitNeedApprovalController.getCampaignById(cam.Id);
        LexCommitNeedApprovalController.getCampaignById('xxx123333');
    }
}