Create isolated test data
A test should create the records it needs.
Your task
Finish the two helpers so a test inserts its own Account and reads it back fresh.
@IsTest
public class AS_5E1BF2D4A826_RecordTests {
public static Account createOwned(String token) {
Account record = new Account(Name = 'AS Test ' + token, Description = token);
return record;
}
public static Account loadOwned(Id recordId) {
return null;
}
@IsTest
static void createsAndLoadsData() {
Account created = createOwned('visible');
Account loaded = loadOwned(created.Id);
Assert.areEqual(created.Name, loaded.Name);
}
}Requirements
- insertsOwnedRecord should pass
- preservesOwnedFields should pass
- loadsRequestedId should pass
- reloadsFreshValues should pass