@isTest private class TenderWebServiceTest { static testMethod void testMethod1() { // 招标项目1 Tender_information__c tic1 = new Tender_information__c(); tic1.Logical_delete__c=false; tic1.ProjectId__c=''; // tic.Retain_Tender__c=''; tic1.InfoId__c=''; // tic1.Hospital__c=hospital.Hospital__c; insert tic1; // 招标项目2 Tender_information__c tic2 = new Tender_information__c(); tic2.Logical_delete__c=false; tic2.ProjectId__c=''; tic2.Retain_Tender__c=tic1.id; tic2.InfoId__c=''; insert tic2; // 业务机会 Opportunity otc = new Opportunity(); // otc.SAP_Send_OK__c = false; // otc.Trade__c = '内貿'; // otc.Stock_apply_status__c = '申请中'; otc.Name= 'GZ-SP-NFM007_1'; otc.StageName= '引合'; otc.CloseDate= date.newinstance(2022, 11, 30); insert otc; // 招标-询价关系 // Tender_Opportunity_Link__c tol=new Tender_Opportunity_Link__c(); // tol.Tender_information__c=tic1.id; // tol.IsRelated__c=true; // tol.Opportunity__c=otc.id; // insert tol; TenderWebService aa=new TenderWebService(); TenderWebService.ContraryLogicalDel(tic2.id); } }