You need to sign in to do that
Don't have an account?
How to write test class for set method
Hi their,
list<string> checkedboxValues=new list<string>{};
public list<string> getcheckedboxValues(){
if(DefaultValue!=null){
string[] temp=DefaultValue.split(';');
for(string s : temp){
checkedboxValues.add(s);
}
}
return checkedboxValues;}
public void setcheckedboxValues(list<string> checkedboxValues){this.checkedboxValues=checkedboxValues;}
If I write test class like this
public static testMethod void testEventListing()
{
ApexPages.StandardController testcontroller;
EventRegistration eventreg = new EventRegistration();
string s = 'test3';
list<string> s1 = new list<string>();
s1.add(s);
eventreg.setcheckedboxValues(s1);
}
Throwing an error Method does not exist or incorrect signature: [EventRegistration].setcheckedboxValues(list<string>)
help pls
From your code, I guess EventRegistration is the current Class name,...