Build a test data factory
A test data factory is a public @IsTest class with helpers that build records for many tests.
Your task
Finish the factory so it builds, inserts and returns the requested Accounts with one DML statement.
@IsTest
public class AS_3C368617D776_DataFactory {
public static List<Account> createAccounts(Integer count, String token) {
List<Account> records = new List<Account>();
return records;
}
@IsTest
static void createsThreeAccounts() {
List<Account> records = createAccounts(3, 'visible');
Assert.areEqual(3, records.size());
}
}Requirements
- createsRequestedCount should pass
- assignsNumberedNames should pass
- handlesSmallestCounts should pass
- returnsInsertedIds should pass
- insertsWithOneStatement should pass