You need to sign in to do that
Don't have an account?
ANIL PAKKI
I am getting error called : Constructor not defined: [Core_IPS_Migrate_CustToPartController].<Constructor>() while writing test class for controller
@istest
public class ABC_test {
static testMethod void testABC() {
ABC obj = new ABC();
obj.method();
}
}
public class ABC_test {
static testMethod void testABC() {
ABC obj = new ABC();
obj.method();
}
}
This may be the case that you are using Core_IPS_Migrate_CustToPartController class as extension controller in vf page where you defined paramterized constructor.
If you are doing so then you have use the same in test class.
Apexpages.StandardController stdController = new Apexpages.StandardController(t); // here t is the contact instance
OpportunityContactController controller = new OpportunityContactController(StdController);