Skip to main content

Below is my code and please let me know what I am doing wrong that I am unable to get through the challenge. (The 'generateRandomContacts' method failed to execute. Either the method does not exist, is not static, or did not return the correct set of Contact records.)

@isTest

public class RandomContactFactory{

public static List<Contact> generateRandomContacts(Integer numCnt, String fname) {

List<Contact> cntkt = new List<Contact>();

for(Integer i=0;i<numCnt;i++) {

cntkt.add(new Contact(firstName=fname + ' ' + i));

}

return cntkt;

}

}

답변 5개
  1. 2021년 8월 6일 오전 2:58

    Hi,

     I don't think @isTest is needed.

0/9000