title | description | author | ms.author | ms.topic | ms.date | ms.custom | ms.reviewer | audience | ms.search.region | ms.search.validFrom | ms.dyn365.ops.version |
---|---|---|---|---|---|---|---|---|---|---|---|
Creators in the Acceptance test library |
Learn about Acceptance test library creators, including naming conventions, code examples, and fluent setter methods. |
MichaelFruergaardPontoppidan |
mfp |
article |
03/27/2019 |
johnmichalak |
Developer |
Global |
2019-03-27 |
App Update 10.0.2 |
[!include banner]
Creator classes provide fluent application programming interfaces (APIs) that are used to create test data.
AtlCreator<ModuleName><EntityName>
In this naming convention:
<ModuleName>
is optional and is based on the names of the modules on the main menu. You should use a short version or an abbreviation to support brevity of test code.<EntityName>
is optional and is used when the command applies to different types of entities.
AtlCreatorCostGroup
AtlCreatorCustomer
Creator classes should provide fluent setter methods that are used to set the properties of the entity that is being constructed.
set<EntityPropertyName>
In this naming convention, <EntityPropertyName>
is the name of the property that is being set for the entity by using the fluent method.
item = new AtlCreatorProductsReleasedVariant()
.setItemId('DemoItem')
.setColor(ecoResColor)
.setStyle(ecoResStyle)
.setConfig(ecoResConfig)
.setSize(ecoResSize)
.create();
For information that will help you choose between entities and creators, see Should I implement an entity or a creator class.
[!INCLUDEfooter-include]