function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abhishek Kumar 149Abhishek Kumar 149 

how to write test class for below logic?

ApexPages.currentPage().getParameters().get('action'); // 0- > New, 1 -> Reply, 2 -> Reply All, 3 -> Forward
BALAJI CHBALAJI CH
Hi Abhishek,

You can put the value for the parameter 'action' in Test clas like below:
ApexPages.currentPage().getParameters().put('action', variable);
where variable is the value to be passed for the parameter action.

Let me know if that helps you.

Best Regards,
BALAJI