Rediger

Creators in the Acceptance test library

Creator classes provide fluent application programming interfaces (APIs) that you can use to create test data.

Naming convention

AtlCreator<ModuleName><EntityName>

In this naming convention:

  • <ModuleName> is optional. Use the names of the modules on the main menu. Use a short version or an abbreviation to keep test code brief.
  • <EntityName> is optional. Use it when the command applies to different types of entities.

Examples

AtlCreatorCostGroup

AtlCreatorCustomer

Fluent setter methods

Creator classes should provide fluent setter methods that set the properties of the entity that you're constructing.

Naming convention

set<EntityPropertyName>

In this naming convention, <EntityPropertyName> is the name of the property that the fluent method sets for the entity.

Example

item = new AtlCreatorProductsReleasedVariant()
    .setItemId('DemoItem')
    .setColor(ecoResColor)
    .setStyle(ecoResStyle)
    .setConfig(ecoResConfig)
    .setSize(ecoResSize)
    .create();

When should you use creators instead of entities?

For information that helps you choose between entities and creators, see Should I implement an entity or a creator class.