| | |
| | | hpOwner2 = new User(Test_staff__c = true, LastName = 'hp2', FirstName = 'owner', Alias = 'hp2', Work_Location__c = '重庆', CommunityNickname = 'hpOwner2', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner2@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id); |
| | | insert hpOwner2; |
| | | |
| | | |
| | | // 病院を作る |
| | | hospital = new Account(); |
| | | hospital.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Account' and DeveloperName = 'HP'].id; |
| | |
| | | dep.Department_Class__c = strategicDep[0].Id; |
| | | dep.Hospital__c = hospital.Id; |
| | | insert dep; |
| | | |
| | | |
| | | // 製品を作る |
| | | productA = new Product2( Name='テスト商品'); |
| | | insert productA; |
| | |
| | | contract.Contract_Start_Date__c = Date.today() - 10; |
| | | contract.Contract_End_Date__c = Date.today() + 10; |
| | | contract.Service_Contract_Staff__c = '00510000002ZZTc'; |
| | | contract.upload_to_RM_time__c = Date.today() + 20; |
| | | insert contract; |
| | | |
| | | |
| | | } |
| | | static testMethod void testMethod1() { |
| | | contract.upload_to_RM_time__c = Datetime.now(); |
| | | update contract; |
| | | |
| | | contract.All_Amount__c = 11.11; |
| | | update contract; |
| | | |