You need to sign in to do that
Don't have an account?
Anonymous Developer
Question Regarding Test Class
Can anyone make a test class example using these custom fields:
any example will do.
Thanks in advance.
- Option Name
- Option Value
- Option Type
- Community ID
any example will do.
Thanks in advance.
Based on that logic in Apex you write test class.
Thanks!
global class OptionManager{
public Options__c listcustomsetting { get; set; }
public OptionManager(){
getlistdata();
}
public void getlistdata(){
listcustomsetting = new Options__c();
Map<String, Options__c> fields = Options__c.getAll();
List<Options__c> objects = Options__c.getAll().values();
System.debug('objects size: ' + objects.size());
System.debug('objects: '+ objects);
Options__c commondata = Options__c.getValues('D');
System.debug('commondata: '+commondata);
listcustomsetting = commondata;
}