| | |
| | | @isTest(SeeAllData=false) |
| | | @isTest() |
| | | private class InquiryVerifyBatchTest { |
| | | |
| | | private static String quoteNo = 'textQutote01'; |
| | |
| | | private static Date createdDateStr = Date.today(); |
| | | |
| | | static testMethod void testMethod1() { |
| | | System.Test.StartTest(); |
| | | // System.Test.StartTest(); |
| | | InitData(); |
| | | |
| | | ID exid = Database.executeBatch(new InquiryVerifyBatch(),1); |
| | | InquiryVerifyBatch bct1 = new InquiryVerifyBatch(null,null); |
| | | ID exid = Database.executeBatch(new InquiryVerifyBatch(),200); |
| | | // System.Test.StopTest(); |
| | | } |
| | | static testMethod void testMethod2(){ |
| | | System.Test.StartTest(); |
| | | InquiryVerifyBatch bct1 = new InquiryVerifyBatch(2022,4); |
| | | System.schedule('Scheduled Job 5', '0 45 * * * ?', bct1); |
| | | |
| | | System.Test.StopTest(); |
| | | } |
| | | |
| | | private static void InitData() { |
| | | User user = new User(Test_staff__c = true); |
| | | // Oly_TriggerHandler.bypass('AWSServiceTool2'); |
| | | Oly_TriggerHandler.bypass('ContactTriggerHandler'); |
| | | // Oly_TriggerHandler.bypass('PIHelper'); |
| | | User user = new User(); |
| | | user.LastName = '_サンブリッジ'; |
| | | user.FirstName = 'う'; |
| | | user.Alias = 'う'; |
| | |
| | | user.Username = 'olympusTest03@sunbridge.com'; |
| | | user.CommunityNickname = 'う'; |
| | | user.IsActive = true; |
| | | user.Employee_No__c = 'om009238'; |
| | | user.EmailEncodingKey = 'ISO-2022-JP'; |
| | | user.TimeZoneSidKey = 'Asia/Tokyo'; |
| | | user.LocaleSidKey = 'ja_JP'; |
| | |
| | | StaticParameter.EscapeOpportunityHpDeptUpdTrigger = true; |
| | | StaticParameter.EscapeSyncOpportunityTrigger = true; |
| | | |
| | | System.runAs(new User(Id = Userinfo.getUserId())) { |
| | | Oly_TriggerHandler.bypass('UserToContact'); |
| | | insert user; |
| | | // テストデータ |
| | | System.runAs(user){ |
| | | Account company = new Account(); |
| | | company.RecordTypeId = rectCo[0].Id; |
| | | company.Name = 'NFM007TestCompany'; |
| | |
| | | depart.ParentId = section.Id; |
| | | depart.Department_Class__c = section.Id; |
| | | depart.Hospital__c = company.Id; |
| | | section.AgentCode_Ext__c = '9999900'; |
| | | depart.AgentCode_Ext__c = '99999001'; |
| | | insert depart; |
| | | |
| | | Opportunity opp = new Opportunity(); |
| | |
| | | |
| | | QuoteLineItem target = new QuoteLineItem(); |
| | | target.Name__c = 'テスト商品'; |
| | | target.QuoteId = quote.Id; |
| | | target.QuoteId = quote.id; |
| | | target.Quantity = 1; |
| | | target.Cost_Subtotal__c = 0; |
| | | target.Cost__c = 200; |
| | |
| | | String flag='NG2'; |
| | | String d1='产品试用'; |
| | | String dept='医疗华北营业本部'; |
| | | // 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.CommunityNickname = 'う'; |
| | | // 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 = dept; |
| | | // user.Use_Start_Date__c = Date.today().addMonths(-6); |
| | | // insert user; |
| | | |
| | | |
| | | FixtureDeliverySlip__c fdsObj = new FixtureDeliverySlip__c(); |
| | | fdsObj.Name = '00001'; |