From 5835379ec30b1667c4e522db9d294c9b7bb8633a Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期二, 26 四月 2022 12:00:31 +0800 Subject: [PATCH] SSBG Back up --- force-app/main/default/classes/SBG007TriggerHandlerTest.cls | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/force-app/main/default/classes/SBG007TriggerHandlerTest.cls b/force-app/main/default/classes/SBG007TriggerHandlerTest.cls index 946dcd9..a002328 100644 --- a/force-app/main/default/classes/SBG007TriggerHandlerTest.cls +++ b/force-app/main/default/classes/SBG007TriggerHandlerTest.cls @@ -1,6 +1,12 @@ @isTest private class SBG007TriggerHandlerTest { + //add sushanhu for pipl 20220415 + @testSetup + static void makaDate(){ + TestDataUtility.CreatePIPolicyConfiguration(); + } + //add sushanhu for pipl 20220415 // static testMethod void itShould(){ // List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE']; // Account accIE = new Account( @@ -64,6 +70,7 @@ // } static testMethod void itShould2(){ + List<RecordType> rectIE = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = 'Customer IE']; Account accIE = new Account( Name = '*', @@ -235,4 +242,12 @@ System.assertEquals('', SBG007TriggerHandler.debug_msg); } + + static testMethod void itShould1(){ + BatchIF_Log__c iflog = new BatchIF_Log__c(); + iflog.Log__c = '{"GeDatas":{"Monitoring":{"TransmissionDateTime":"202108250938","Text":"","Tag":"MSGH","Sender":"8405","Receiver":"1330","NumberOfRecord":"1","MessageType":"SBG027","MessageGroupNumber":"20210000465499"},"GeData":[{"ZNMPA":"N","TradeType":"Taxation","SpecialWarranty":null,"SpecialDeliveryAddress":"3000002093,C-2018-72066","ServiceFee":null,"SalesChannel":"41","SalesAccountCode":"76002795","PurposeOfAdvice":null,"ProductSegment":"BS","PaymentCondition":"ZZTT","Other3":"null,null","Other2":"璺ㄧ渷浠藉悎浣滈」鐩�","Other1":"test,dealer","OrderCode":"00050193","OpportunityCode":"O-2021-115172","OlympusPriceBeforeDiscount":null,"OlympusContractPrices":729412.00,"MachineParts":"Machine","GeDataDetails":[{"ItemQuantity":20,"ItemCode":"000000000006498300","DetailLine":10},{"ItemQuantity":20,"ItemCode":"N2664900","DetailLine":20}],"ForeignTradeCompany":null,"EndUser":"C-2016-25119","Discount":49.00,"DeliveryDate":"20210825","DealerSalesStaffName":"a","DealerCode":"3000002093","CoopAgentPCT":"50","CoopAgent":"A-2021-120990"}]}}'; + insert iflog; + SBG007TriggerHandler.execute(iflog,null); + } + } \ No newline at end of file -- Gitblit v1.9.1