From f1c525740c6a45b875d8ed96fb0ddb68c97ef3df Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期五, 08 四月 2022 21:04:44 +0800 Subject: [PATCH] Merge branch 'PIPLFunctionCode0408' --- force-app/main/default/classes/PIHelperTest.cls | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 44 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/classes/PIHelperTest.cls b/force-app/main/default/classes/PIHelperTest.cls index 8b1bb00..52ac40a 100644 --- a/force-app/main/default/classes/PIHelperTest.cls +++ b/force-app/main/default/classes/PIHelperTest.cls @@ -1,3 +1,45 @@ -public class PIHelperTest { - +@isTest +private class PIHelperTest { + static testMethod void getPIIntegrationInfo() { + TestDataUtility.CreatePIPolicyConfiguration('Contact'); + String sobjectType = 'Contact'; + List<AWS_Integration_Info__mdt> awsConfigurationList = [SELECT App_Id__c,Token_URL__c,App_Secret__c,Host_URL__c FROM AWS_Integration_Info__mdt WHERE DeveloperName = 'AWS_Default_Configuration']; + Test.startTest(); + PIHelper.getPIIntegrationInfo(sobjectType); + Test.stopTest(); + } + static testMethod void saveTransLog() { + Test.startTest(); + PIHelper.saveTransLog('module','vadsjngrqvjca','avgwshDFcxAS', 'DSAGSFBQdfdsoav','test','0','testmsg'); + Test.stopTest(); + } + /*static testMethod void confirmTrans() { + Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreatePIHelperHttpMock()); + Test.startTest(); + List<PIHelper.idList> idList = new List<PIHelper.idList>(); + PIHelper.idList pid = new PIHelper.idList(); + pid.awsId = 'vadsjngrqvjca'; + pid.sfRecordId = 'avgwshDFcxAS'; + idList.add(pid); + PIHelper.confirmTrans('module',1,'vadsjngrqvjca' ,'avgwshDFcxAS' ,'DSAGSFBQdfdsoav','https://sfpi-mebg-test.olympuschina.com/api/contact/insert',idList); + Test.stopTest(); + }*/ + /*static testMethod void confirmFileTrans() { + Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreatePIHelperHttpMock()); + Test.startTest(); + PIHelper.confirmFileTrans('module',1,'vadsjngrqvjca' ,'avgwshDFcxAS','DSAGSFBQdfdsoav','https://sfpi-mebg-test.olympuschina.com/api/contact/insert'); + Test.stopTest(); + }*/ + /*static testMethod void insertConfirmTrans() { + Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreatePIHelperHttpMock()); + Test.startTest(); + List<PIHelper.idList> idList = new List<PIHelper.idList>(); + PIHelper.idList pid = new PIHelper.idList(); + pid.awsId = 'vadsjngrqvjca'; + pid.sfRecordId = 'avgwshDFcxAS'; + idList.add(pid); + PIHelper.insertConfirmTrans('module',1,'vadsjngrqvjca' ,'avgwshDFcxAS' ,0,'https://sfpi-mebg-test.olympuschina.com/api/contact/insert',idList); + Test.stopTest(); + }*/ + } \ No newline at end of file -- Gitblit v1.9.1