@isTest
|
private class lexSolutionProgrammaControllerTest {
|
@TestSetup
|
static void makeData(){
|
Id userId = UserInfo.getUserId();
|
SolutionProjectRequirements__c solProject = new SolutionProjectRequirements__c();
|
solProject.Name = 'Test';
|
solProject.HospitalOwner__c = userId;
|
solProject.Sales_Assistant__c = userId;
|
solProject.GIR_Assistant__c = userId;
|
solProject.Project_Type__c = '新建大楼';
|
solProject.Purpose_Proposal__c = '促进销售商谈';
|
insert solProject;
|
Solution_Programme__c solProgramme1 = new Solution_Programme__c();
|
solProgramme1.Name = 'test';
|
solProgramme1.SolutionProjectRequirements__c = solProject.Id;
|
solProgramme1.Business_Promotion__c = userId;
|
insert solProgramme1;
|
}
|
static testMethod void test1(){
|
Solution_Programme__c solProgramme1 = [select Id from Solution_Programme__c limit 1];
|
SolutionProjectRequirements__c solProject = [select Id from SolutionProjectRequirements__c limit 1];
|
Test.startTest();
|
lexSolutionProgrammaController.initForNewSolutionProgramma(solProject.Id);
|
lexSolutionProgrammaController.initForNewSolutionClosingAttachment(solProgramme1.Id);
|
Test.stopTest();
|
}
|
}
|