You need to sign in to do that
Don't have an account?
Chiyan
help me to write a test code
Public class Stage{
List<Opportunity> ops;
String[] Stage = new String[]{};
Public String[] getStage(){
return Stage;
}
Public List<SelectOption> getitems(){
List<SelectOption> Options= new List<SelectOption>();
options.add(new SelectOption('Closed Won', 'Closed Won'));
options.add(new SelectOption('Closed Lost', 'Closed Lost'));
options.add(new SelectOption('Qualification', 'Open'));
return options;
}
Public void setStage(String[] Stage){
this.Stage = Stage;
}
Public List<Opportunity> getOpp(){
return ops;
}
Public Pagereference Result(){
ops = [select name, stagename, closedate from Opportunity where stagename =: Stage];
return null;
}
}
List<Opportunity> ops;
String[] Stage = new String[]{};
Public String[] getStage(){
return Stage;
}
Public List<SelectOption> getitems(){
List<SelectOption> Options= new List<SelectOption>();
options.add(new SelectOption('Closed Won', 'Closed Won'));
options.add(new SelectOption('Closed Lost', 'Closed Lost'));
options.add(new SelectOption('Qualification', 'Open'));
return options;
}
Public void setStage(String[] Stage){
this.Stage = Stage;
}
Public List<Opportunity> getOpp(){
return ops;
}
Public Pagereference Result(){
ops = [select name, stagename, closedate from Opportunity where stagename =: Stage];
return null;
}
}
Raj Vakati
Try this