黄千龙
2022-04-08 01f207d979d6be17c8cdec293feab48828c0ec3e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@isTest
private class SearchContactControllerTest {
    @TestSetup
    static void makeData(){
        
    }
    static testMethod void testMethod1() {
        TestDataUtility.CreatePIPolicyConfiguration('Contact');
        Contact con = TestDataUtility.CreateContacts(1)[0];
        con.AWS_Data_Id__c = 'davdsvgrqcx';
        con.RecordTypeId = '01210000000QfWiAAK';
        update con;
        List<String> awsList = new List<String>();
        awsList.add(con.AWS_Data_Id__c);
        String awsListJson = JSON.serialize(awsList);
 
        String url = ApexPages.currentPage().getParameters().put('accountId',con.AccountId);
        Test.startTest();
        SearchContactController scc = new SearchContactController();
        SearchContactController.searchContactsNoPI(con.Name);
        SearchContactController.searchContacts(awsListJson,con.Name,con.AccountId);
        Test.stopTest();
    }
}