| | |
| | | insert fsObjA1; |
| | | |
| | | //备品借出申请 |
| | | Rental_Apply__c raObj = new Rental_Apply__c(); |
| | | /*Rental_Apply__c raObj = new Rental_Apply__c(); |
| | | raObj.Name = 'testra'; |
| | | raObj.Product_category__c = 'GI'; |
| | | raObj.Demo_purpose1__c = '产品试用'; |
| | |
| | | raObj.Phone_number__c = '1234567890'; |
| | | raObj.Loaner_medical_Staff__c = contact2.Id; |
| | | raObj.Repair__c = rpr.Id; |
| | | insert raObj; |
| | | insert raObj;*/ |
| | | |
| | | Fixture_Set_Detail__c fsdObjA1 = new Fixture_Set_Detail__c(); |
| | | |
| | |
| | | fsdObjA1.SortInt__c = 1; |
| | | |
| | | // 借出备品配套一览 |
| | | Rental_Apply_Equipment_Set__c raesObj = new Rental_Apply_Equipment_Set__c(); |
| | | /* Rental_Apply_Equipment_Set__c raesObj = new Rental_Apply_Equipment_Set__c(); |
| | | raesObj.Rental_Apply__c = raObj.Id; |
| | | raesObj.Fixture_Set__c = fsObjA1.Id; |
| | | raesObj.Cancel_Select__c = false; |
| | |
| | | raesdObj1.DataMigration_Flag__c = true; |
| | | insert raesdObj1; |
| | | raesObj.First_RAESD__c = raesdObj1.Id; |
| | | update raesObj; |
| | | update raesObj; */ |
| | | } |
| | | |
| | | @isTest |
| | |
| | | insert iflog; |
| | | |
| | | NFM603Controller.callout(iflog.Id,idList); |
| | | |
| | | Test.stopTest(); |
| | | } |
| | | @isTest |
| | | static void testCallOut3(){ |
| | | List<Repair__c> repairList = [select id from Repair__c]; |
| | | Test.startTest(); |
| | | List<Id> idList = new List<Id>(); |
| | | for(Repair__c repair : repairList){ |
| | | idList.add(repair.Id); |
| | | } |
| | | NFM603Controller.callout('',idList); |
| | | |
| | | Test.stopTest(); |
| | | } |
| | |
| | | // NFM603Controller.ManualExecute(iflog.Id); |
| | | // } |
| | | |
| | | @isTest |
| | | static void NFM603BatchTest01(){ |
| | | Test.startTest(); |
| | | Database.executeBatch(new NFM603Batch(),100); |
| | | Test.stopTest(); |
| | | } |
| | | // @isTest |
| | | // static void NFM603BatchTest01(){ |
| | | // Test.startTest(); |
| | | // Database.executeBatch(new NFM603Batch(),100); |
| | | // Test.stopTest(); |
| | | // } |
| | | |
| | | @isTest |
| | | static void NFM603BatchTest02(){ |
| | | // @isTest |
| | | // static void NFM603BatchTest02(){ |
| | | |
| | | List<Repair__c> repairList = [select id from Repair__c]; |
| | | // List<Repair__c> repairList = [select id from Repair__c]; |
| | | |
| | | Test.startTest(); |
| | | // Test.startTest(); |
| | | |
| | | List<Id> idList = new List<Id>(); |
| | | for(Repair__c repair : repairList){ |
| | | idList.add(repair.Id); |
| | | } |
| | | Database.executeBatch(new NFM603Batch(idList),100); |
| | | Test.stopTest(); |
| | | } |
| | | // List<Id> idList = new List<Id>(); |
| | | // for(Repair__c repair : repairList){ |
| | | // idList.add(repair.Id); |
| | | // } |
| | | // Database.executeBatch(new NFM603Batch(idList),100); |
| | | // Test.stopTest(); |
| | | // } |
| | | @isTest |
| | | static void NFM603execute(){ |
| | | List<BatchIF_Log__c> logList = [select id from BatchIF_Log__c]; |
| | |
| | | NFM603Controller.ManualExecute(iflog.Id); |
| | | Test.stopTest(); |
| | | } |
| | | @isTest |
| | | static void NFM603execute1(){ |
| | | List<BatchIF_Log__c> logList = [select id from BatchIF_Log__c]; |
| | | Test.startTest(); |
| | | BatchIF_Log__c iflog = logList[0]; |
| | | NFM603Controller.ManualExecute(''); |
| | | Test.stopTest(); |
| | | } |
| | | |
| | | } |