You need to sign in to do that
Don't have an account?
akhil g 6
Help me to create test class for below code
public class RandomContactFactory {
public static List<contact> generaterandomcontacts(Integer numberofcontacts,string lastnames){
List<contact> contacts = new List<contact>();
for(integer i=0;i<numberofcontacts;i++){
contact con = new contact(FirstName = 'Test'+i,Lastname = lastnames);
contacts.add(con);
}
return contacts;
}
}
public static List<contact> generaterandomcontacts(Integer numberofcontacts,string lastnames){
List<contact> contacts = new List<contact>();
for(integer i=0;i<numberofcontacts;i++){
contact con = new contact(FirstName = 'Test'+i,Lastname = lastnames);
contacts.add(con);
}
return contacts;
}
}
This will give 100% code coverage.