@isTest 붙이지 말고 만들라길래 뭔가 했더니
그냥 동적으로 테스트 데이터 만들라는 거였음...
public class RandomContactFactory {
public static List<Contact> generateRandomContacts(Integer numOfContact, String lastName) {
List<Contact> conList = new List<Contact>();
for(Integer i = 0; i < numOfContact; i++) {
String firstName = 'Test ' + i;
conList.add(new Contact(LastName=lastName, FirstName=firstName));
firstName = '';
}
return conList;
}
}
Apex 너무 무난하게 끝났는디...?;
'Salesforce > Trailhead' 카테고리의 다른 글
Aura app에 component 끼우고 확인하기 (0) | 2021.03.25 |
---|---|
Developer Beginner | Visualforce Basics | Create & Use Custom Controllers (0) | 2021.03.23 |
[Developer Beginner] Apex Testing | Test Apex Triggers (0) | 2021.03.22 |
[Developer Beginner] Apex Testing | Get Started with Apex Unit Tests (0) | 2021.03.22 |
[Developer Beginner] Apex Triggers | Bulk Apex Triggers (0) | 2021.03.22 |
댓글