@isTest
|
private class lexSolutionProgrammeControllerTest {
|
@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];
|
Test.startTest();
|
lexSolutionProgrammeController.initSubmitSolutionSchemeForApprovalButton(solProgramme1.Id);
|
lexSolutionProgrammeController.queryForAttachments(solProgramme1.Id);
|
lexSolutionProgrammeController.updateSubmitSolutionSchemeForApprovalButton(solProgramme1.Id);
|
lexSolutionProgrammeController.submitApproval(solProgramme1.Id);
|
lexSolutionProgrammeController.updateSubmitSolutionSchemeForApprovalButton('');
|
lexSolutionProgrammeController.submitApproval(solProgramme1.Id);
|
Test.stopTest();
|
}
|
}
|