| | |
| | | Agency_Hospital_Link__c ahl = new Agency_Hospital_Link__c(); |
| | | ahl.Hospital__c = dept.Hospital_Department_Class__c; |
| | | ahl.Agency__c = dept.Id; |
| | | insert ahl; |
| | | |
| | | try{ |
| | | insert ahl; |
| | | }catch(Exception e){ |
| | | system.debug('Exception from insert hospital:'+e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @isTest public static void getAccountsTest() { |
| | |
| | | // Implement test code |
| | | System.runAs(user) { |
| | | List<Agency_Contact__c> res = AgencyAccountCmp.getAccounts(); |
| | | System.assertEquals(2, res.size()); |
| | | } |
| | | } |
| | | |
| | |
| | | testInit(); |
| | | System.runAs(user) { |
| | | Map<String,String> res = AgencyAccountCmp.getfiledsmap(); |
| | | System.assertEquals('客户人员名', res.get('Name')); |
| | | //System.assertEquals('.客户人员名', res.get('Name')); |
| | | System.assertEquals('医院名', res.get('Hospital_Name__c')); |
| | | } |
| | | } |
| | | |
| | |
| | | // Implement test code |
| | | System.runAs(user) { |
| | | List<Agency_Contact__c> res = AgencyAccountCmp.searchAccounts('', 'test1'); |
| | | System.assertEquals(1, res.size()); |
| | | } |
| | | } |
| | | @isTest public static void saveLogTest(){ |