You need to sign in to do that
Don't have an account?
vikas malik
I got this error when i save my test class. Constructor not defined: [recordExt].<Constructor>()
here is my class..
@IsTest
public class TestrecordExt{
static testMethod void TestEmp(){
//test.startTest();
List<employee__c> eList = new List<employee__c>();
employee__c e = new employee__c();
e.Name = 'test';
e.Last_Name__c = 'test';
e.Join_Date__c = Date.Today();
e.City__c = 'test city';
e.Phone__c = '123456';
eList.add(e);
e = new employee__c();
e.Name = 'employee Name';
e.Last_Name__c = 'emp Last Name';
e.Join_Date__c = Date.Today();
e.City__c = 'test city';
e.Phone__c = '123456';
eList.add(e);
insert eList;
recordExt r = new recordExt();
r.saveEmp();
//test.stopTest();
}
}
@IsTest
public class TestrecordExt{
static testMethod void TestEmp(){
//test.startTest();
List<employee__c> eList = new List<employee__c>();
employee__c e = new employee__c();
e.Name = 'test';
e.Last_Name__c = 'test';
e.Join_Date__c = Date.Today();
e.City__c = 'test city';
e.Phone__c = '123456';
eList.add(e);
e = new employee__c();
e.Name = 'employee Name';
e.Last_Name__c = 'emp Last Name';
e.Join_Date__c = Date.Today();
e.City__c = 'test city';
e.Phone__c = '123456';
eList.add(e);
insert eList;
recordExt r = new recordExt();
r.saveEmp();
//test.stopTest();
}
}
Hi,
You did not define the default Constructor in your controller.
Create a Constructor in your controller like below.
public recordExt(){
}