From d8dc84a3d56df839895f1c417a4d9cbee763d262 Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期五, 03 三月 2023 14:50:59 +0800
Subject: [PATCH] gzw 测试环境代码更新
---
force-app/main/default/classes/NewRepairControllerTest.cls | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/classes/NewRepairControllerTest.cls b/force-app/main/default/classes/NewRepairControllerTest.cls
index 79b9183..f13219a 100644
--- a/force-app/main/default/classes/NewRepairControllerTest.cls
+++ b/force-app/main/default/classes/NewRepairControllerTest.cls
@@ -10,7 +10,13 @@
private class NewRepairControllerTest {
static testMethod void testMethod1() {
//1. 鍑嗗鏁版嵁
- TestDataUtility.CreatePIPolicyConfiguration();
+ List<String> strList = new List<String>();
+ strList.add('Repair__c');
+ strList.add('Address__c');
+ strList.add('Contact');
+ strList.add('RepairSubOrder__c');
+ strList.add('Repair__cV2');
+ TestDataUtility.CreatePIPolicyConfigurations(strList);
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
Repair__c repTest = TestDataUtility.CreateRepairs(1)[0];
//2. 杩愯浠g爜閫昏緫
@@ -32,6 +38,7 @@
strList.add('Address__c');
strList.add('Contact');
strList.add('RepairSubOrder__c');
+ strList.add('Repair__cV2');
TestDataUtility.CreatePIPolicyConfigurations(strList);
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
String url = ApexPages.currentPage().getParameters().put('00N10000006P6SM','鍖椾含');
@@ -75,14 +82,19 @@
Repair__c repTest = TestDataUtility.CreateRepairs(1)[0];
- url = ApexPages.currentPage().getParameters().put('RepairId',repTest.Id);
+ url = ApexPages.currentPage().getParameters().put('retURL','%'+repTest.Id);
Test.startTest();
ApexPages.StandardController con = new ApexPages.StandardController(new Repair__c());
NewRepairController repDetail = new NewRepairController(con);
Test.stopTest();
}
static testMethod void testMethod3(){
- TestDataUtility.CreatePIPolicyConfiguration('Repair__c');
+ List<String> strList = new List<String>();
+ strList.add('Repair__c');
+ strList.add('Repair__cV2');
+ strList.add('Contact');
+ strList.add('Address__c');
+ TestDataUtility.CreatePIPolicyConfigurations(strList);
ApexPages.StandardController con = new ApexPages.StandardController(new Repair__c());
try{
NewRepairController controllerTest = new NewRepairController(con);
@@ -91,6 +103,7 @@
}catch(Exception e){
system.debug('Exception from insert repair:'+e.getMessage());
}
+
NewRepairController.EncryptUpdate('a0J1m000001QqX');
NewRepairController.EncryptUpdate('a0J1m000001QqXk');
}
--
Gitblit v1.9.1