We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To reuse common field values we often use EntityBuilder, for example
`@IsTest private class AtkBugTest {
@IsTest private static void test1() { ATK.SaveResult atkResult = ATK.prepare(Opportunity.SObjectType, 10) .build(new OpportunityEntityBuilder()) .field(Opportunity.Name).repeat('Test Name') .mock(); List<Opportunity> opportunities = (List<Opportunity>) atkResult.get(Opportunity.SObjectType); for (Opportunity opp : opportunities) { Assert.areEqual('Test Name', opp.Name); // this fails, actual result is OPPORTUNITY-NAME-1 } } public class OpportunityEntityBuilder implements ATK.EntityBuilder { public void build(ATK.Entity entity, Integer size) { entity .field(Opportunity.Name).index('OPPORTUNITY-NAME-{0}') .field(Opportunity.Description).repeat('Test Description') .field(Opportunity.CloseDate).repeat(Date.today().addMonths(1)); } }
}`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
To reuse common field values we often use EntityBuilder, for example
`@IsTest
private class AtkBugTest {
}`
The text was updated successfully, but these errors were encountered: