From 2f1466af31796c1a963f26e86038ddc84471ed2e Mon Sep 17 00:00:00 2001
From: 李彤 <litong@prec-tech.com>
Date: 星期六, 02 四月 2022 17:42:24 +0800
Subject: [PATCH] 目标录入相关判断修改
---
force-app/main/default/classes/NFM702ControllerTest.cls | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/NFM702ControllerTest.cls b/force-app/main/default/classes/NFM702ControllerTest.cls
index 37b6b2c..093d951 100644
--- a/force-app/main/default/classes/NFM702ControllerTest.cls
+++ b/force-app/main/default/classes/NFM702ControllerTest.cls
@@ -1,6 +1,9 @@
@isTest
private class NFM702ControllerTest {
-
+ @TestSetup
+ static void makeData(){
+ TestDataUtility.CreatePIPolicyConfiguration('NFM702');
+ }
public Class GeDatas {
public NFMUtil.Monitoring Monitoring;
public GeData[] GeData;
@@ -53,9 +56,16 @@
Monitoring.Text = '';
BatchIF_Log__c rowData = NFMUtil.saveRowData(Monitoring, 'NFM702', GeDatas.GeData);
+ List<Contact> conList = TestDataUtility.CreateContacts(3);
List<String> geList = new List<String>();
- geList.add('C000033002');
+ if(conList.size()>0){
+ for(Contact con : conList){
+ geList.add(con.Id);
+ }
+ }
+ Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreatePIHelperHttpMock());
NFM702Controller.callout(rowData.id, geList);
+ NFM702Controller.ManualExecute(rowData.id);
}
}
\ No newline at end of file
--
Gitblit v1.9.1