From e3c02c03dd2de442bbced87236f60a13a1cd154e Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期四, 02 三月 2023 17:51:57 +0800
Subject: [PATCH] gzw 正式环境最新代码更新
---
force-app/main/default/classes/ContactTriggerHandlerTest.cls | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/ContactTriggerHandlerTest.cls b/force-app/main/default/classes/ContactTriggerHandlerTest.cls
index 0f3665c..14ae131 100644
--- a/force-app/main/default/classes/ContactTriggerHandlerTest.cls
+++ b/force-app/main/default/classes/ContactTriggerHandlerTest.cls
@@ -6,6 +6,16 @@
public static Contact contact1 = new Contact();
public static Contact contact2 = new Contact();
+ @Testsetup
+ static void setup(){
+ List<String> strList = new List<String>();
+ strList.add('Agency_Contact__c');
+ strList.add('Agency_Contact__cV2');
+ strList.add('Contact');
+ TestDataUtility.CreatePIPolicyConfigurations(strList);
+ //TestDataUtility.CreatePIPolicyConfiguration('Agency_Contact__c');
+
+ }
@isTest static void test_method_one() {
List<RecordType> HPrectCo = [select Id, Name, DeveloperName from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'];
List<RecordType> GIrectCo = [select Id, Name, DeveloperName from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Department_Class_GI'];
@@ -24,7 +34,6 @@
// account1.RecordTypeId = '01210000000QemG';
account1.RecordTypeId = HPrectCo[0].Id;
insert account1;
-
// 鍙栧紩鍏堣铂浠昏��
contact1.AccountId = account1.Id;
contact1.FirstName = '璨换鑰�';
@@ -36,6 +45,16 @@
contact1.RecordTypeId = DoctorrectCo[0].Id;
contact1.UnifiedI_Contact_ID__c = '100000';
insert contact1;
+
+ contact2.FirstName = 'test';
+ contact2.LastName = 'Data';
+ // contact2.RecordTypeId = '01210000000QfWi';
+ contact2.RecordTypeId = DoctorrectCo[0].Id;
+ contact2.AccountId = account1.Id;
+ contact2.Agency_User__c = true;
+ contact2.MobilePhone = '18999999999';
+ insert contact2;
+
MeetingManagement__c a =
new MeetingManagement__c(Contact__c =contact1.id
,pollingTime__c = 1,
@@ -79,8 +98,6 @@
contact2.Agency_User__c = true;
contact2.MobilePhone = '18999999999';
insert contact2;
- contact2.MobilePhone = '1899999999A';
- update contact2;
Contact contact3 = new Contact();
contact3.FirstName = 'test';
@@ -92,6 +109,10 @@
contact3.Ignore_Same_Name__c = true;
contact3.MobilePhone = '';
insert contact3;
+
+ contact2.MobilePhone = '1899999999A';
+ update contact2;
+
List<account> accList = [select Dealer_Num__c From account];
system.assertEquals(accList[0].Dealer_Num__c,1);
--
Gitblit v1.9.1