| | |
| | | } |
| | | |
| | | @isTest static void test_setAgency_Contact_Share_ToRole() { |
| | | Oly_TriggerHandler.bypass('AgencyHospitalHandler'); |
| | | MergeAgencyActivityBatchTest.makeNormalData(true); |
| | | |
| | | // assert |
| | |
| | | |
| | | Test.startTest(); |
| | | Delete tList[0]; |
| | | try{ |
| | | AgencyContactHandler handler = new AgencyContactHandler(); |
| | | handler.newMap = new Map<Id, Agency_Contact__c>(); |
| | | handler.oldMap = new Map<Id, Agency_Contact__c>(); |
| | | handler.newList =new List<Agency_Contact__c>(); |
| | | handler.oldList = new List<Agency_Contact__c>(); |
| | | handler.afterInsert(); |
| | | handler.afterUndelete(); |
| | | }catch(Exception e){ |
| | | system.debug('Exception from undelete'); |
| | | } |
| | | Test.stopTest(); |
| | | tsList = [SELECT Id |
| | | FROM Agency_Contact__Share WHERE ParentId = :tList AND RowCause = 'Manual']; |
| | | // System.assertEquals(1, tsList.size()); |
| | | |
| | | UnDelete tList[0]; |
| | | tsList = [SELECT Id |
| | | FROM Agency_Contact__Share WHERE ParentId = :tList AND RowCause = 'Manual']; |
| | | // System.assertEquals(2, tsList.size()); |
| | | } |
| | | } |