高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/SearchVistorControllerTest.cls
@@ -42,11 +42,6 @@
     */
    @TestSetup
    static void makeData(){
        TestDataUtility.CreatePIPolicyConfiguration('Contact');
    }
    private static void init() {
        loginId = UserInfo.getUserId();
        Profile p = [select id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        
        u3 = new User(Test_staff__c = true);
@@ -100,6 +95,12 @@
        u2.Job_Category__c = '销售推广';
        u2.Province__c = '東京';
        insert u2;
    }
    private static void init() {
        TestDataUtility.CreatePIPolicyConfigurations(new string[]{'Agency_Contact__c','Contact'});
        loginId = UserInfo.getUserId();
        
        RecordType rtHP = [select id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName =:'HP'];
        RecordType rtDepClass = [select id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName =:'Department_Class_ENT'];           // 耳鼻喉科
@@ -290,4 +291,11 @@
            svc.serContact();
        }
    }
    static testMethod void test01_04() {
        Test.startTest();
        Contact con = TestDataUtility.CreateContacts(1)[0];
        SearchVisitorController.searchContactByAccountId(con.AccountId);
        Test.stopTest();
    }
}