You need to sign in to do that
Don't have an account?

How to write test method for this page reference?
How to write test method for this page reference?
public List<Project_Task__c> taskNameChangeToQAList {get;set;}
public PageReference taskNameChangeToQA() {
taskNameChangeToQAList=[select Status__c,List__c from Project_Task__c where Id=:ApexPages.currentPage().getParameters().get('projectTaskId')];
taskNameChangeToQAList[0].Status__c ='QA';
taskNameChangeToQAList[0].List__c ='QA';
update taskNameChangeToQAList;
return null;
}
public List<Project_Task__c> taskNameChangeToFinishList {get;set;}
public PageReference taskNameChangeToFinish() {
taskNameChangeToFinishList=[ select Status__c,List__c from Project_Task__c where Id=:ApexPages.currentPage().getParameters().get('projectTaskId')];
taskNameChangeToFinishList[0].Status__c ='finished';
taskNameChangeToFinishList[0].List__c ='Finished';
update taskNameChangeToFinishList;
return null;
}
something along these lines: