| | |
| | | |
| | | TestDataUtility.CreatePIPolicyConfiguration(); |
| | | Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock()); |
| | | Address__c ad = TestDataUtility.CreateAddresses(1)[0]; |
| | | ad.Using_Datetime__c = Datetime.now(); |
| | | ad.IsFromSPO__c = false; |
| | | insert ad; |
| | | Address__c ad2 = TestDataUtility.CreateAddresses(1)[0]; |
| | | ad2.Using_Datetime__c = Datetime.now(); |
| | | ad2.IsFromSPO__c = false; |
| | | insert ad2; |
| | | |
| | | Test.startTest(); |
| | | System.debug('ad' + ad); |
| | | ApexPages.StandardController con = new ApexPages.StandardController(ad); |
| | | System.debug('ad2' + ad2); |
| | | ApexPages.StandardController con = new ApexPages.StandardController(ad2); |
| | | System.debug('con.Id' + con.getRecord().Id); |
| | | NewAndEditAddressController adTest = new NewAndEditAddressController(con); |
| | | System.debug('adTest----'+adTest); |
| | | Map<String,Object> mapTest = new Map<String,Object>(); |
| | | mapTest.put('Contacts__c',ad.Contacts__c); |
| | | mapTest.put('Using_Datetime__c',ad.Using_Datetime__c); |
| | | mapTest.put('Customer__c',ad.Customer__c); |
| | | mapTest.put('Telephone__c',ad.Telephone__c); |
| | | mapTest.put('Province__c',ad.Province__c); |
| | | mapTest.put('City__c',ad.City__c); |
| | | mapTest.put('Detailed_Address__c',ad.Detailed_Address__c); |
| | | mapTest.put('Address_Classification__c',ad.Address_Classification__c); |
| | | mapTest.put('IsFromSPO__c',ad.IsFromSPO__c); |
| | | mapTest.put('Contacts__c',ad2.Contacts__c); |
| | | mapTest.put('Using_Datetime__c',ad2.Using_Datetime__c); |
| | | mapTest.put('Customer__c',ad2.Customer__c); |
| | | mapTest.put('Telephone__c',ad2.Telephone__c); |
| | | mapTest.put('Province__c',ad2.Province__c); |
| | | mapTest.put('City__c',ad2.City__c); |
| | | mapTest.put('Detailed_Address__c',ad2.Detailed_Address__c); |
| | | mapTest.put('Address_Classification__c',ad2.Address_Classification__c); |
| | | mapTest.put('IsFromSPO__c',ad2.IsFromSPO__c); |
| | | String addressJson = JSON.serialize(mapTest); |
| | | System.debug('addressJson:' + addressJson); |
| | | |