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

Regarding IdeaStandardSetController



I have a problem with IdeaStandardSetController TestCoverage.


Here is my Controller with TestCoverage


public class MyIdeaProfileExtension1 {
private final ApexPages.IdeaStandardSetController ideaSetController;

public MyIdeaProfileExtension1(ApexPages.IdeaStandardSetController controller)  // Here I am Unable to Pass the                    

                                                                                                                              Values,How to Pass the values to Constructor    

                                                                                                                           through Test Method.

ideaSetController = (ApexPages.IdeaStandardSetController)controller;

public List<Idea> getModifiedIdeas() {
Idea[] ideas = ideaSetController.getIdeaList();
// modify ideas here

return ideas;


static testmethod void MyIdeaProfileTest()
Community cm=[select id from community];
idea Testideas=new idea(,title='hii');
list<idea> ideas=new list<idea>();
insert ideas;
Apexpages.ideaStandardsetController isc;
// Apexpages.standardSetcontroller ssc =new Apexpages.standardSetcontroller(ideas);
//Apexpages.ideaStandardsetController isc= new apexpages.ideaStandardsetController(ideas);
MyIdeaProfileExtension1 mp = new MyIdeaProfileExtension1(isc);


Here above in test code I have Taken As variable as Apexpages.IdeaStandardSetController isc and Passing it.

Can anyone tell me how to do this

Through the Apexpages.IdeaStandardSetController isc, I have to pass the Ideas