From b823c7f3569cf9368e2245846e918f78f32e903a Mon Sep 17 00:00:00 2001 From: GWY <guweiyiscp096@foxmail.com> Date: 星期五, 15 四月 2022 11:38:47 +0800 Subject: [PATCH] Merge branch 'master' of http://47.92.229.245:8089/r/OlympusSSBG --- 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