liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
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
31
32
@isTest
private class LexEventCancelControllerTest {
    static testMethod void testMethod1() {
        Event insertTarget = new Event();
        insertTarget.Subject = 'test00';
        insertTarget.StartDateTime =  Datetime.now().adddays(5);
        //2021-08-09   mzy   SWAG-C4YB9J  事件页面优化 update   start
        //insertTarget.DurationInMinutes = 60;
        insertTarget.EndDateTime = Datetime.now().adddays(5).addMinutes(60);
        //2021-08-09   mzy   SWAG-C4YB9J  事件页面优化 update   end
        insertTarget.Location = 'testLocation';
        insertTarget.Activity_Type2__c = '病院';
        insertTarget.OPDPlan_Flag__c = true ;
        insertTarget.PlanProdDetail__c = 'CV-290*4; GI-290镜子*1; GI-290镜子CF*1;';
        insert insertTarget;
 
        task__c t1 = new task__c();
        t1.Name = 'test1';
        t1.taskDifferent__c = '主动任务';
        t1.taskStatus__c = '02 接受';
        t1.assignee__c = Userinfo.getUserId();
        t1.Activity_Date__c = Date.newInstance(2021, 7, 17);
        insert t1;
        LexEventCancelController c = new LexEventCancelController();
        LexEventCancelController.init(insertTarget.Id);
        LexEventCancelController.getTaskC(t1.Id);
        LexEventCancelController.getTaskC1(t1.Id);
        LexEventCancelController.init('insertTarget.Id');
        LexEventCancelController.getTaskC('t1.Id');
        LexEventCancelController.getTaskC1('t1.Id');
    }
}