You need to sign in to do that
Don't have an account?
XIO
HELP with Test Class Error: Constructor not defined: [ApexPages.StandardSetController].<Constructor>.......
Hello,
I'm getting the error below.
Error: Compile Error: Constructor not defined: [ApexPages.StandardSetController].<Constructor>(Login_Information_Object__c) at line 22 column 46
for the Test Class below. The Test Class is for a Visualforce Page controller. Any assistance is greatly appreciated.
I'm getting the error below.
Error: Compile Error: Constructor not defined: [ApexPages.StandardSetController].<Constructor>(Login_Information_Object__c) at line 22 column 46
for the Test Class below. The Test Class is for a Visualforce Page controller. Any assistance is greatly appreciated.
@isTest public class VFTSIAITSplashPageController_UT { static testMethod void myTest() { Login_Information_Object__c lio=new Login_Information_Object__c(); lio.LIO_Content__c='test'; lio.LIO_End_Date__c=Date.today() + 30; lio.LIO_Start_Date__c=Date.today() + 1; lio.Show_On_Login__c=TRUE; lio.Subject__c='testing'; insert lio; PageReference pageRef1 = Page.TSIAInformationSplashPage; Test.setCurrentPage(pageRef1); pageRef1.getParameters().put('id',lio.Id); ApexPages.StandardSetController sc = new ApexPages.StandardSetController(lio); VFTSIAITSplashPageController testlio = new VFTSIAITSplashPageController (sc); testlio.save(); } }
In class, default constructor is defined,
So in test class, Comment or remove this line:
Now bellow changes:
All Answers
(lstLio is added in code)
Unfortunately, I'm getting the same error :(
In class, default constructor is defined,
So in test class, Comment or remove this line:
Now bellow changes: