Replies: 1 comment
-
public class TestData implements Builder {
public interface Builder {
Builder template(SObject prototype);
Builder set(SObjectField field, Object value);
Builder set(String field, Object value);
SObject build();
SObject buildAndInsert();
List<SObject> buildMany(Integer amount);
List<SObject> buildAndInsertMany(Integer amount);
}
public interface Variants {
}
public interface Randomizer {
}
public static of(SObjectType type) {
return new TestData(type);
}
public TestData(SObjectType type) {
// ...
}
// methods implementation
}
public class AccountTestBuilder extends TestData {
public AccountTestBuilder() {
}
}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How should the test library framework work from a developer’s perspective?
The API/interface should:
Beta Was this translation helpful? Give feedback.
All reactions