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

How to write test class for Options?
Hi all,
I am not sure how to write test class for this method. Any help would be greatly appreciated!!
public List<SelectOption> getDiningTimeOptions()
{
List<SelectOption> options = new List<SelectOption>();
List<String> Times = this.getDynamicPicklistValues('Intake__c', 'Time__c');
for (String Time : Times)
{
options.add(new SelectOption(Time, Time));
}
return options;
}
I am not sure how to write test class for this method. Any help would be greatly appreciated!!
public List<SelectOption> getDiningTimeOptions()
{
List<SelectOption> options = new List<SelectOption>();
List<String> Times = this.getDynamicPicklistValues('Intake__c', 'Time__c');
for (String Time : Times)
{
options.add(new SelectOption(Time, Time));
}
return options;
}
Please try the following:
Hope this helps!
Best regards,
Martijn Schwärzer
Ps. If my answer helped you, please mark it as best answer. It will help others find best answer as well.