You need to sign in to do that
Don't have an account?
Set controller extension testing - compile error
Error: Compile Error: Constructor not defined: [ApexPages.StandardSetController].<Constructor>(SOBJECT:Case) at line 13 column 39
Getting this error - not sure how to proceed.
@isTest
private class CaseBulkConfirmTest {
static testMethod void TestCaseBulkConfirm(){
PageReference pageRef = Page.CaseBulkConfirm;
Test.setCurrentPageReference(pageRef);
Case c = new case();
ApexPages.StandardSetController ssc = new ApexPages.StandardSetController(c);
CaseBulkConfirm e = new CaseBulkConfirm(ssc);
String nextPage1 = e.ConfirmNext().getURL();
String nextPage2 = e.CancelClose().getURL();
System.assertEquals('apex/CaseBulkUpdate',nextPage1);
System.assertEquals('/500/o',nextPage2);
}
}
Solution is that I needed to pass an array to the standardsetcontroller rather than a single record.