| | |
| | | @isTest |
| | | private class NFM620RestTest { |
| | | |
| | | @isTest static void test_method_one() { |
| | | @TestSetup |
| | | static void makeData(){ |
| | | List<String> strList= new List<String>(); |
| | | strList.add('Agency_Contact__c'); |
| | | strList.add('Contact'); |
| | | TestDataUtility.CreatePIPolicyConfigurations(strList); |
| | | } |
| | | |
| | | @isTest static void test_method_one() { |
| | | // 省 |
| | | Address_Level__c al = new Address_Level__c(); |
| | | al.Name = '北京'; |
| | |
| | | insert dep; |
| | | |
| | | //useを得る |
| | | Profile p = [select id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User u1 = new User(Test_staff__c = true); |
| | | u1.LastName = '_サンブリッジ'; |
| | | u1.FirstName = 'あ'; |
| | | u1.Batch_User__c = true; |
| | | u1.Alias = 'あ'; |
| | | u1.Email = 'olympusTest01@sunbridge.com'; |
| | | u1.Username = 'olympusTest10@sunbridge.com'; |
| | | u1.CommunityNickname = 'あ1'; |
| | | u1.IsActive = true; |
| | | u1.EmailEncodingKey = 'ISO-2022-JP'; |
| | | u1.TimeZoneSidKey = 'Asia/Tokyo'; |
| | | u1.LocaleSidKey = 'ja_JP'; |
| | | u1.LanguageLocaleKey = 'ja'; |
| | | u1.ProfileId = p.id; |
| | | u1.Job_Category__c = '销售服务'; |
| | | u1.Province__c = '北京'; |
| | | insert u1; |
| | | // Profile p = [select id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | // User u1 = new User(Test_staff__c = true); |
| | | // u1.LastName = '_サンブリッジ'; |
| | | // u1.FirstName = 'あ'; |
| | | // u1.Batch_User__c = true; |
| | | // u1.Alias = 'あ'; |
| | | // u1.Email = 'olympusTest01@sunbridge.com'; |
| | | // u1.Username = 'olympusTest10@sunbridge.com'; |
| | | // u1.CommunityNickname = 'あ1'; |
| | | // u1.IsActive = true; |
| | | // u1.EmailEncodingKey = 'ISO-2022-JP'; |
| | | // u1.TimeZoneSidKey = 'Asia/Tokyo'; |
| | | // u1.LocaleSidKey = 'ja_JP'; |
| | | // u1.LanguageLocaleKey = 'ja'; |
| | | // u1.ProfileId = p.id; |
| | | // u1.Job_Category__c = '销售服务'; |
| | | // u1.Province__c = '北京'; |
| | | // insert u1; |
| | | |
| | | Contact contact2 = new Contact(); |
| | | contact2.UnifiedI_Contact_ID__c = 'test001'; |
| | |
| | | insert dep; |
| | | |
| | | //useを得る |
| | | Profile p = [select id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | User u1 = new User(Test_staff__c = true); |
| | | u1.LastName = '_サンブリッジ'; |
| | | u1.FirstName = 'あ'; |
| | | u1.Batch_User__c = true; |
| | | u1.Alias = 'あ'; |
| | | u1.Email = 'olympusTest01@sunbridge.com'; |
| | | u1.Username = 'olympusTest10@sunbridge.com'; |
| | | u1.CommunityNickname = 'あ1'; |
| | | u1.IsActive = true; |
| | | u1.EmailEncodingKey = 'ISO-2022-JP'; |
| | | u1.TimeZoneSidKey = 'Asia/Tokyo'; |
| | | u1.LocaleSidKey = 'ja_JP'; |
| | | u1.LanguageLocaleKey = 'ja'; |
| | | u1.ProfileId = p.id; |
| | | u1.Job_Category__c = '销售服务'; |
| | | u1.Province__c = '北京'; |
| | | insert u1; |
| | | // Profile p = [select id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | // User u1 = new User(Test_staff__c = true); |
| | | // u1.LastName = '_サンブリッジ'; |
| | | // u1.FirstName = 'あ'; |
| | | // u1.Batch_User__c = true; |
| | | // u1.Alias = 'あ'; |
| | | // u1.Email = 'olympusTest01@sunbridge.com'; |
| | | // u1.Username = 'olympusTest10@sunbridge.com'; |
| | | // u1.CommunityNickname = 'あ1'; |
| | | // u1.IsActive = true; |
| | | // u1.EmailEncodingKey = 'ISO-2022-JP'; |
| | | // u1.TimeZoneSidKey = 'Asia/Tokyo'; |
| | | // u1.LocaleSidKey = 'ja_JP'; |
| | | // u1.LanguageLocaleKey = 'ja'; |
| | | // u1.ProfileId = p.id; |
| | | // u1.Job_Category__c = '销售服务'; |
| | | // u1.Province__c = '北京'; |
| | | // insert u1; |
| | | //OCSM管理省を得る |
| | | OCM_Management_Province__c mp1 = new OCM_Management_Province__c(); |
| | | mp1.Name = '北京'; |
| | | mp1.Province__c = '北京市'; |
| | | mp1.Window1__c = u1.Id; |
| | | //mp1.Window1__c = u1.Id; |
| | | insert mp1; |
| | | |
| | | Contact contact2 = new Contact(); |