| | |
| | | public class NewAgencyContactControllerTest { |
| | | @isTest |
| | | static void testMethod1() { |
| | | TestDataUtility.CreatePIPolicyConfiguration(); |
| | | TestDataUtility.CreatePIPolicyConfiguration('Agency_Contact__c'); |
| | | |
| | | Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock()); |
| | | Agency_Contact__c ac = TestDataUtility.CreateAgencyContacts(1)[0]; |
| | |
| | | |
| | | @isTest |
| | | static void testMethod3() { |
| | | TestDataUtility.CreatePIPolicyConfiguration(); |
| | | TestDataUtility.CreatePIPolicyConfiguration('Agency_Contact__c'); |
| | | |
| | | Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock()); |
| | | String rid = ''; |
| | |
| | | System.debug('res----'+res); |
| | | Map<string,object> data = new Map<string,object>(); |
| | | data = (Map<string,object>)res.Data; |
| | | data.put('AWS_Data_Id__c','321'); |
| | | System.debug('data = ' + JSON.serialize(data)); |
| | | NewAgencyContactController.Save(null, ac.Id+''); |
| | | NewAgencyContactController.Save(data, ac.Id+''); |
| | | |
| | | Test.stopTest(); |
| | | } |