From 1312ba82d4c880bdb5357d28e0d4af5b285f610f Mon Sep 17 00:00:00 2001 From: 高章伟 <gaozhangwei@prec-tech.com> Date: 星期四, 10 三月 2022 15:54:39 +0800 Subject: [PATCH] 最近一月修改内容 --- force-app/main/default/classes/NFM115ControllerTest.cls | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/classes/NFM115ControllerTest.cls b/force-app/main/default/classes/NFM115ControllerTest.cls index 14b3402..898a314 100644 --- a/force-app/main/default/classes/NFM115ControllerTest.cls +++ b/force-app/main/default/classes/NFM115ControllerTest.cls @@ -22,8 +22,12 @@ } static testMethod void testMethod1(){ + Account account2 = new Account(); + account2.Name = 'test1缁忛攢鍟�'; + account2.RecordTypeId = '01210000000Qem1'; + insert account2; ID AgencyID = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Office').getRecordTypeId(); - Agency = new Account(RecordTypeId = AgencyID, Name = 'NFM115TestAgency', FSE_SP_Main_Leader__c = UserInfo.getUserId(), FSE_GI_Main_Leader__c = UserInfo.getUserId()); + Agency = new Account(ParentId = account2.Id, RecordTypeId = AgencyID, Name = 'NFM115TestAgency', FSE_SP_Main_Leader__c = UserInfo.getUserId(), FSE_GI_Main_Leader__c = UserInfo.getUserId()); insert Agency; Agency = [select Management_Code__c, Management_Code_Auto__c, Name, Id from Account where Id = :Agency.Id]; @@ -47,8 +51,12 @@ } static testMethod void testMethod2(){ + Account account2 = new Account(); + account2.Name = 'test1缁忛攢鍟�'; + account2.RecordTypeId = '01210000000Qem1'; + insert account2; ID AgencyID = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Office').getRecordTypeId(); - Agency = new Account(RecordTypeId = AgencyID, Name = 'NFM115TestAgency', FSE_SP_Main_Leader__c = UserInfo.getUserId(), FSE_GI_Main_Leader__c = UserInfo.getUserId()); + Agency = new Account(ParentId = account2.Id, RecordTypeId = AgencyID, Name = 'NFM115TestAgency', FSE_SP_Main_Leader__c = UserInfo.getUserId(), FSE_GI_Main_Leader__c = UserInfo.getUserId()); insert Agency; Agency = [select Management_Code__c, Management_Code_Auto__c, Name, Id from Account where Id = :Agency.Id]; -- Gitblit v1.9.1