You need to sign in to do that
Don't have an account?
Zabi Mohammed
Constructor not defined
Hi,
please any body help on bellow error i am getting this error when i was writing a test class
Constructor not defined: [ApexPages.StandardController].<Constructor>(List<Account>)
Constructor not defined: [MyController].<Constructor>(ApexPages.StandardController)
i was use bellow code to solve this problem but still i am getting same error.
PageReference aPage = Page.aPage;
aPage.getParameters().put('AnyVariable', 'Test Value');
test.setCurrentPage(aPage);
// Instantiate the standard controller
Account act = new Account();
Apexpages.StandardController sc = new Apexpages.standardController(act);
// Instantiate the extension
myControllerExtension ext = new myControllerExtension(sc);
thanks,
zabi
please any body help on bellow error i am getting this error when i was writing a test class
Constructor not defined: [ApexPages.StandardController].<Constructor>(List<Account>)
Constructor not defined: [MyController].<Constructor>(ApexPages.StandardController)
i was use bellow code to solve this problem but still i am getting same error.
PageReference aPage = Page.aPage;
aPage.getParameters().put('AnyVariable', 'Test Value');
test.setCurrentPage(aPage);
// Instantiate the standard controller
Account act = new Account();
Apexpages.StandardController sc = new Apexpages.standardController(act);
// Instantiate the extension
myControllerExtension ext = new myControllerExtension(sc);
thanks,
zabi
http://amitsalesforce.blogspot.in/search/label/Test%20Class
Please check below post. How to write test classes
http://amitsalesforce.blogspot.in/2015/06/best-practice-for-test-classes-sample.html
Please check below Example how to create test class for trigger, Controller and Standard Controller.
Test Class for Trigger Test Class for Standard Controller Test Class for Controller class
Please let us know if this will help you
Thanks
Amit Chaudhary