| | |
| | | } |
| | | |
| | | @isTest static void test_method_two(){ |
| | | List<RecordType> rectCo = [select Id, Name, DeveloperName from RecordType where IsActive = true and SobjectType = 'Campaign' and DeveloperName = 'Society']; |
| | | System.runAs(new User(Id = Userinfo.getUserId())) { |
| | | User user = new User(Test_staff__c = true); |
| | | user.LastName = '_サンブリッジ'; |
| | | user.FirstName = 'う'; |
| | | user.Alias = 'う'; |
| | | user.Email = 'olympusTest03@sunbridge.com'; |
| | | user.Username = 'olympusTest03@sunbridge.com'; |
| | | user.IsActive = true; |
| | | user.EmailEncodingKey = 'ISO-2022-JP'; |
| | | user.TimeZoneSidKey = 'Asia/Tokyo'; |
| | | user.LocaleSidKey = 'ja_JP'; |
| | | user.LanguageLocaleKey = 'ja'; |
| | | user.ProfileId = System.Label.ProfileId_SystemAdmin; |
| | | user.Province__c = '北京'; |
| | | user.Dept__c = '医疗华北营业本部'; |
| | | user.Use_Start_Date__c = Date.today().addMonths(-6); |
| | | insert user; |
| | | |
| | | Application_for_Conference_Adjudication__c afca = new Application_for_Conference_Adjudication__c(); |
| | | afca.Name = 'hahaha'; |
| | | afca.MeetingApprovedNo__c = 'TEST99793'; |
| | | afca.Num__c = 'MT-HB-202112-5773'; |
| | | afca.ProcessState__c = '审批中'; |
| | | insert afca; |
| | | |
| | | Campaign cam = new Campaign(); |
| | | cam.Name = 'test campaign'; |
| | | cam.StartDate = Date.today().addDays(15); |
| | | cam.EndDate = Date.today().addDays(18); |
| | | cam.Name2__c = '1234'; |
| | | cam.Status = '申请中'; |
| | | cam.Mailflg_after45__c = true; |
| | | cam.Mailflg_cancel__c = true; |
| | | cam.Mailflg_before15__c = true; |
| | | cam.Mailflg_before7__c = true; |
| | | cam.Mailflg_after3__c = true; |
| | | cam.HostName__c = '1'; |
| | | cam.cooperatorCompany__c = '1'; |
| | | cam.RecordTypeId = rectCo[0].Id; |
| | | cam.OwnerId = user.Id; |
| | | cam.Meeting_Approved_No__c = afca.id; |
| | | insert cam; |
| | | system.debug('cam.Num__c'+cam.Num__c); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | RestRequest req = new RestRequest(); |
| | | RestResponse res = new RestResponse(); |
| | |
| | | RestContext.response = res; |
| | | |
| | | NFM706Rest.doPost(); |
| | | |
| | | |
| | | } |
| | | } |