From 80f74bc1dfbf4a6f2fa358efe027590d2cdb5b99 Mon Sep 17 00:00:00 2001
From: GWY <guweiyiscp096@foxmail.com>
Date: 星期二, 19 四月 2022 10:39:16 +0800
Subject: [PATCH] 代理商公共小组,无影响。
---
force-app/main/default/classes/ProRegisterLinkHandlerTest.cls | 73 +++++++++++-------------------------
1 files changed, 23 insertions(+), 50 deletions(-)
diff --git a/force-app/main/default/classes/ProRegisterLinkHandlerTest.cls b/force-app/main/default/classes/ProRegisterLinkHandlerTest.cls
index 28198b8..487966f 100644
--- a/force-app/main/default/classes/ProRegisterLinkHandlerTest.cls
+++ b/force-app/main/default/classes/ProRegisterLinkHandlerTest.cls
@@ -8,37 +8,28 @@
prorec.RegisterNoClass_New__c = '';
prorec.RegisterNoClass_Old__c = '6822';
prorec.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
- prorec.RegisterNoStatus__c = '鏈夋晥';
- prorec.ValidTo__c = Date.today();
+ prorec.ValidTo__c = Date.today().addDays(22);
+ prorec.ValidFrom__c = Date.today().addDays(-22);
insert prorec;
-
- Product2__c product2 = new Product2__c();
+
+ Product2 product2 = new Product2();
product2.Name = 'WD18100A';
insert product2;
Product2 pro = new Product2();
pro.Name = 'A00507A:瀵嗗皝鍦�, 閫忔槑, 榛戣壊';
- pro.MDM_Model_No__c = 'A00507A';
- //pro.Register_Latest__c = 'a2wp0000000QYv3AAG';
- pro.Brand_Name__c = '濂ユ灄宸存柉';
- pro.SFDA_Approbation_No__c = '鍥芥娉ㄨ繘20162220210';
- pro.SFDA_Approbated_Date__c = Date.valueOf('2016-05-19');
- pro.SFDA_Expiration_Date__c = Date.valueOf('2021-01-23');
- pro.ProduceCompany__c = '鍚嶇О:濂ユ灄宸存柉鑻囬煶鐗瑰拰鎰忓寳鍏徃;浣忔墍:Kuehnstr.6122045 姹夊牎寰峰浗;鑱旂郴鏂瑰紡:0049-40-66966-0';
- pro.SFDA_Approbated_Status__c = '鏈夋晥';
- pro.RegisterNo_ALL__c = '鍥芥娉ㄨ繘20162220210';
insert pro;
-
+
Product_Register_Link__c prl = new Product_Register_Link__c(Product_Register__c = prorec.ID);
prl.Product2__c = pro.ID;
- insert prl;
+ insert prl;
System.Test.startTest();
Product_Register_Link__c prl001 = new Product_Register_Link__c(Product_Register__c = prorec.ID);
prl001.Product2__c = pro.ID;
insert prl001;
- System.Test.stopTest();
+ System.Test.stopTest();
}
static testMethod void AfterUpdate() {
@@ -48,37 +39,28 @@
prorec.RegisterNoClass_New__c = '';
prorec.RegisterNoClass_Old__c = '6822';
prorec.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
- prorec.RegisterNoStatus__c = '鏈夋晥';
- prorec.ValidTo__c = Date.today();
+ prorec.ValidTo__c = Date.today().addDays(22);
+ prorec.ValidFrom__c = Date.today().addDays(-22);
insert prorec;
-
- Product2__c product2 = new Product2__c();
+
+ Product2 product2 = new Product2();
product2.Name = 'WD18100A';
insert product2;
Product2 pro = new Product2();
pro.Name = 'A00507A:瀵嗗皝鍦�, 閫忔槑, 榛戣壊';
- pro.MDM_Model_No__c = 'A00507A';
- //pro.Register_Latest__c = 'a2wp0000000QYv3AAG';
- pro.Brand_Name__c = '濂ユ灄宸存柉';
- pro.SFDA_Approbation_No__c = '鍥芥娉ㄨ繘20162220210';
- pro.SFDA_Approbated_Date__c = Date.valueOf('2016-05-19');
- pro.SFDA_Expiration_Date__c = Date.valueOf('2021-01-23');
- pro.ProduceCompany__c = '鍚嶇О:濂ユ灄宸存柉鑻囬煶鐗瑰拰鎰忓寳鍏徃;浣忔墍:Kuehnstr.6122045 姹夊牎寰峰浗;鑱旂郴鏂瑰紡:0049-40-66966-0';
- pro.SFDA_Approbated_Status__c = '鏈夋晥';
- pro.RegisterNo_ALL__c = '鍥芥娉ㄨ繘20162220210';
insert pro;
Product_Register_Link__c prl = new Product_Register_Link__c(Product_Register__c = prorec.ID);
prl.Product2__c = pro.ID;
- insert prl;
+ insert prl;
System.Test.startTest();
- Product_Register_Link__c prl001 = new Product_Register_Link__c(Product_Register__c = prorec.ID);
+ Product_Register_Link__c prl001 = new Product_Register_Link__c(Product_Register__c = prorec.ID);
prl001.Product2__c = pro.ID;
insert prl001;
- update prl001;
- System.Test.stopTest();
+ update prl001;
+ System.Test.stopTest();
}
static testMethod void AfterDelete() {
@@ -88,37 +70,28 @@
prorec.RegisterNoClass_New__c = '';
prorec.RegisterNoClass_Old__c = '6822';
prorec.PrdCompanyAddr__c = '鍚嶇О:濂ユ灄宸存柉鍖荤枟鏍紡浼氱ぞ;浣忔墍:鏃ユ湰鍥戒笢浜兘娑╄胺鍖哄埂涔嬭胺浜屼竵鐩�43鐣湴2鍙�;鑱旂郴鏂瑰紡:0081-426-42-2667';
- prorec.RegisterNoStatus__c = '鏈夋晥';
- prorec.ValidTo__c = Date.today();
+ prorec.ValidTo__c = Date.today().addDays(22);
+ prorec.ValidFrom__c = Date.today().addDays(-22);
insert prorec;
-
- Product2__c product2 = new Product2__c();
+
+ Product2 product2 = new Product2();
product2.Name = 'WD18100A';
insert product2;
Product2 pro = new Product2();
pro.Name = 'A00507A:瀵嗗皝鍦�, 閫忔槑, 榛戣壊';
- pro.MDM_Model_No__c = 'A00507A';
- //pro.Register_Latest__c = 'a2wp0000000QYv3AAG';
- pro.Brand_Name__c = '濂ユ灄宸存柉';
- pro.SFDA_Approbation_No__c = '鍥芥娉ㄨ繘20162220210';
- pro.SFDA_Approbated_Date__c = Date.valueOf('2016-05-19');
- pro.SFDA_Expiration_Date__c = Date.valueOf('2021-01-23');
- pro.ProduceCompany__c = '鍚嶇О:濂ユ灄宸存柉鑻囬煶鐗瑰拰鎰忓寳鍏徃;浣忔墍:Kuehnstr.6122045 姹夊牎寰峰浗;鑱旂郴鏂瑰紡:0049-40-66966-0';
- pro.SFDA_Approbated_Status__c = '鏈夋晥';
- pro.RegisterNo_ALL__c = '鍥芥娉ㄨ繘20162220210';
insert pro;
Product_Register_Link__c prl = new Product_Register_Link__c(Product_Register__c = prorec.ID);
prl.Product2__c = pro.ID;
- insert prl;
+ insert prl;
System.Test.startTest();
- Product_Register_Link__c prl001 = new Product_Register_Link__c(Product_Register__c = prorec.ID);
+ Product_Register_Link__c prl001 = new Product_Register_Link__c(Product_Register__c = prorec.ID);
prl001.Product2__c = pro.ID;
insert prl001;
- delete prl001;
- System.Test.stopTest();
+ delete prl001;
+ System.Test.stopTest();
}
}
\ No newline at end of file
--
Gitblit v1.9.1