高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/PAEDecisionRecordControllerTest.cls
@@ -1,6 +1,7 @@
@isTest
private class PAEDecisionRecordControllerTest {
    static testMethod void myUnitTest() {
    /*static testMethod void myUnitTest() {
        Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        // ユーザー作成
        User hpOwner = new User(Job_Category__c = '销售服务', Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
@@ -143,7 +144,7 @@
        controller3.InsertMoreRows();
        controller3.SaveAndClose();
        // System.Test.stopTest();
    }
    }*/
    static testMethod void myUnitTest2() {
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectCo.size() == 0) {
@@ -304,6 +305,8 @@
        System.Test.setCurrentPage(page);
        PAEDecisionRecordController controller = new PAEDecisionRecordController(new ApexPages.StandardController(repair1));
        controller.CancelineFlag = 3;
        controller.test();// 20220804 ljh add
        // 初始化测试
        controller.init();
      controller.paedRecordDetailView[0].paedrdd.PAED_ManagementCode__c = 'T001';
@@ -496,7 +499,10 @@
        // 初始化测试
        controller2.init();
        
        controller2.paedRecordDetailView[0].paedrdd.PAED_ManagementCode__c = 'T002';
        // 20220725 ljh update start
        // controller2.paedRecordDetailView[0].paedrdd.PAED_ManagementCode__c = 'T002';
        controller2.paedRecordDetailView[0].paedrdd.PAED_ManagementCode__c = 'T002,T220525';
        // 20220725 ljh update end
        controller2.paedRecordDetailView[0].paedrdd.PAE_Judge__c = 'Unknown';
        controller2.paedRecordDetailView[0].paedrdd.PAED_Status__c = '有效';
        controller2.paedRecordDetailView[0].paedrdd.PAED_Reappear_Result__c = '不再現';
@@ -674,7 +680,7 @@
        controller3.InsertMoreRows();
        controller3.SaveAndClose();
    }
    static testMethod void test002() {
    /*static testMethod void test002() {
        Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        // ユーザー作成
        User hpOwner = new User(Job_Category__c = '销售服务', Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
@@ -828,7 +834,7 @@
        controller3.InsertMoreRows();
        controller3.sendToSAP();
        // System.Test.stopTest();
    }
    }*/
    static testMethod void test003() {
        Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
@@ -991,7 +997,7 @@
        // controller3.sendToSAP();
        // System.Test.stopTest();
    }
    static testMethod void test004() {
    /*static testMethod void test004() {
        Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
        // ユーザー作成
        User hpOwner = new User(Job_Category__c = '销售服务', Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
@@ -1147,7 +1153,7 @@
        controller3.InsertMoreRows();
        controller3.sendToSAP();
        // System.Test.stopTest();
    }
    }*/