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
33
@isTest
public with sharing class SidebarControllerTest {
    public SidebarControllerTest() {
 
    }
    @IsTest(SeeAllData=true)
    static void testCallOut1(){
        // Report rt = new Report();
        // rt.DeveloperName = 'ProductReport';
        // insert rt;
        List<Report> repairList = [select DeveloperName from Report where DeveloperName !='' limit 1];
        Test.startTest();
        SidebarController sd = new SidebarController();
        System.debug('testCallOut1 repairList : ' + repairList);
        sd.DeveloperName = repairList[0].DeveloperName;
 
        // DeveloperName = repairList[0].DeveloperName;
        sd.toURL();
        sd.init();
        // SidebarController.toURL();
        // SidebarController.init();
        Test.stopTest();
    }
 
    @IsTest
    static void testCallOut2(){
        Test.startTest();
        SidebarController sd = new SidebarController();
        sd.toURL();
        // sd.init();
        Test.stopTest();
    }
}