From eeb7c0a2d6f037d515bb822d739036b69c4dc73a Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期五, 08 四月 2022 17:14:12 +0800
Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlyMEBG
---
force-app/main/default/classes/OnCallControllerTest.cls | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/OnCallControllerTest.cls b/force-app/main/default/classes/OnCallControllerTest.cls
new file mode 100644
index 0000000..9b1790b
--- /dev/null
+++ b/force-app/main/default/classes/OnCallControllerTest.cls
@@ -0,0 +1,22 @@
+@isTest
+private class OnCallControllerTest {
+ @TestSetup
+ static void makeData(){
+ TestDataUtility.CreatePIPolicyConfiguration('On_Call__c');
+ }
+ static testMethod void testMethod1() {
+ String onCallJson = '{"Status_c__c":"璺熻繘涓�","segment__c":"'+'000000000000000'+'","OwnerId":"0050l000005fcnt","Responsible_Person_HP__c":"Test","Oncall_report_number_c__c":"Test","Caller_phone__c":"186435431212","Hospital__c":"'+'000000000000000'+'","Trable_occur_day_c__c":"2022/03/24 10:45","Taking_call_Time_c__c":"2022/03/24 10:45","First_ploblem_c__c":"","From_c__c":"","To_c__c":"","Oncall_Equipment__c":"000000000000000","Oncall_Product_manual__c":"","Customer_Problem_c__c":"","FinishDataTime__c":"","Customer_sigh_c__c":false,"Customer_sigh_day_c__c":"","AWS_Data_Id__c":"1234567890"}';
+ Test.startTest();
+ On_Call__c onCall = new On_Call__c();
+ ApexPages.StandardController sc = new ApexPages.StandardController(onCall);
+ OnCallController occ = new OnCallController(sc);
+ Test.stopTest();
+ }
+ static testMethod void testMethod2() {
+ Test.startTest();
+ String onCallJson = '{"Status_c__c":"璺熻繘涓�","segment__c":"'+'000000000000000'+'","OwnerId":"0050l000005fcnt","Responsible_Person_HP__c":"Test","Oncall_report_number_c__c":"Test","Caller_phone__c":"186435431212","Hospital__c":"'+'000000000000000'+'","Trable_occur_day_c__c":"2022/03/24 10:45","Taking_call_Time_c__c":"2022/03/24 10:45","First_ploblem_c__c":"","From_c__c":"","To_c__c":"","Oncall_Equipment__c":"000000000000000","Oncall_Product_manual__c":"","Customer_Problem_c__c":"","FinishDataTime__c":"","Customer_sigh_c__c":false,"Customer_sigh_day_c__c":"","AWS_Data_Id__c":"1234567890"}';
+ OnCallController.saveOnCall(onCallJson,'1adf234dafa',true);
+ OnCallController.saveOnCall(onCallJson,'1adf234dafa',false);
+ Test.stopTest();
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.1