| | |
| | | private class RollupToHPBatchTest { |
| | | static Date targetToday = RollupToHPBatch.getTargetDay().addDays(1); |
| | | static Datetime targetNow = Datetime.newInstance(targetToday, Time.newInstance(6, 0, 0, 0)); |
| | | |
| | | /** |
| | | static testMethod void testExecute() { |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | | |
| | | // 20230227 ljh add start |
| | | StaticParameter.EscapeNFM001Trigger = true; |
| | | StaticParameter.EscapeNFM001AgencyContractTrigger = true; |
| | | StaticParameter.EscapeNFM001AgencyContractTrigger2 = true; |
| | | StaticParameter.EscapeOppandStaTrigger = true; |
| | | // 20230227 ljh add end |
| | | Oly_TriggerHandler.bypass('PowerBIBaseHandler'); |
| | | |
| | | Profile p = [select Id from Profile where id = :System.Label.ProfileId_SystemAdmin]; |
| | |
| | | System.assertEquals(0, dccheck5[0].Energy_Processor_Count__c); |
| | | System.assertEquals(1, dccheck5[0].Energy_Processor_Count_SP__c); |
| | | System.assertEquals(1, dccheck5[0].Other_Competitor_Product_Count__c); |
| | | } |
| | | }**/ |
| | | static testMethod void SoakupHPOppRanktaxTest() { |
| | | ControllerUtil.EscapeNFM001Trigger = true; |
| | | |
| | |
| | | |
| | | insert new Maintenance_Contract__c[] {mc1, mc2, mc3}; |
| | | |
| | | Contact cont1 = new Contact(); |
| | | cont1.FirstName = 'FirstName1'; |
| | | cont1.LastName = 'LastName1'; |
| | | cont1.Number_of_participant_for_TTC__c = 1; |
| | | cont1.HCP__c = '学術HCP'; |
| | | cont1.Strategic_dept_Class__c = dcs[0].Id; |
| | | //Contact cont1 = new Contact(); |
| | | //cont1.FirstName = 'FirstName1'; |
| | | //cont1.LastName = 'LastName1'; |
| | | //cont1.Number_of_participant_for_TTC__c = 1; |
| | | //cont1.HCP__c = '学術HCP'; |
| | | //cont1.Strategic_dept_Class__c = dcs[0].Id; |
| | | |
| | | Contact cont2 = new Contact(); |
| | | cont2.FirstName = 'FirstName2'; |
| | | cont2.LastName = 'LastName2'; |
| | | cont2.Number_of_participant_for_TTC__c = 2; |
| | | cont2.HCP__c = '製品HCP'; |
| | | cont2.Strategic_dept_Class__c = dcs[0].Id; |
| | | //Contact cont2 = new Contact(); |
| | | //cont2.FirstName = 'FirstName2'; |
| | | //cont2.LastName = 'LastName2'; |
| | | //cont2.Number_of_participant_for_TTC__c = 2; |
| | | //cont2.HCP__c = '製品HCP'; |
| | | //cont2.Strategic_dept_Class__c = dcs[0].Id; |
| | | |
| | | Contact cont3 = new Contact(); |
| | | cont3.FirstName = 'FirstName3'; |
| | | cont3.LastName = 'LastName3'; |
| | | cont3.Number_of_participant_for_TTC__c = 4; |
| | | cont3.HCP__c = '一般HCP'; |
| | | cont3.Strategic_dept_Class__c = dcs[1].Id; |
| | | //Contact cont3 = new Contact(); |
| | | //cont3.FirstName = 'FirstName3'; |
| | | //cont3.LastName = 'LastName3'; |
| | | //cont3.Number_of_participant_for_TTC__c = 4; |
| | | //cont3.HCP__c = '一般HCP'; |
| | | //cont3.Strategic_dept_Class__c = dcs[1].Id; |
| | | |
| | | insert new Contact[] {cont1, cont2, cont3}; |
| | | //insert new Contact[] {cont1, cont2, cont3}; |
| | | |
| | | Integer targetmonth = targetToday.addDays(-1).month(); |
| | | |