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
ANIL PAKKIANIL 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();        
             
      }
       
 } 
Raj VakatiRaj Vakati
I think its not coming from the class ... Please check Core_IPS_Migrate_CustToPartController class ..
devedeve
Hi ANIL,

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);