@isTest
|
public with sharing class EnquiryNoBiddingControllerTest {
|
static testMethod void testMethod1() {
|
//创建数据
|
//招投标项目
|
//创建招投标项目
|
Enquiry_No_Bidding_Apply__c Enq = new Enquiry_No_Bidding_Apply__c();
|
Enq.irresponsibleReason__c = '竞品参数';
|
Enq.InvolveBudgetAmount__c = 1;
|
Enq.RepsExtraContent__c = '123';
|
insert Enq;
|
|
Tender_information__c Ten = new Tender_information__c();
|
Ten.Name = '123456';
|
Ten.ProjectId__c = '38_99df2844cf784982acdc61d00d7a7dbb';
|
|
insert Ten;
|
|
|
Opportunity opp = new Opportunity();
|
opp.Name = 'test询价';
|
opp.StageName = '目標';
|
//opp.AgencyOpp_FromOCM__c = true;
|
opp.SAP_Send_OK__c = false;
|
opp.CloseDate = Date.newInstance(2222, 7, 15);
|
opp.Bidding_Project_Name_Bid__c = Ten.Id;
|
opp.Opp_Bid__c = Enq.Id;
|
insert opp;
|
|
//根据ID查询 招投标项目
|
EnquiryNoBiddingController.GetInspectById(Enq.Id);
|
EnquiryNoBiddingController.GetTenderInformationById(Ten.Id);
|
EnquiryNoBiddingController.GetIrresponsibleReason ();
|
//保存 应标数据 JSONData 是 招投标项目 对象的 json格式的值
|
string JSONData = JSON.serialize(Ten);
|
EnquiryNoBiddingController.SaveDataYB(JSONData,opp.Id,'是');
|
//提交审核 应标数据 JSONData 是 招投标项目 对象的 json格式的值
|
EnquiryNoBiddingController.ChangeDataYB(JSONData,opp.Id,'是');
|
//查询用户
|
EnquiryNoBiddingController.CheckOwner('a4J1m0000008bkl');
|
|
//查询用户
|
EnquiryNoBiddingController.GetDataById(opp.Id);
|
|
}
|
}
|