Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition
by Simon Buxton
How it works...
This recipe showed two methods that can be used to test assertions. The assertExpectedLines method is the typical method you should use, but you can also use the assertCount method where appropriate.
When using assertExpectedLines, it expects an AtlSpecification to act as the criteria. The plain-English request we are making here is this: for a list of vehicle groups, assert that there should be a vehicle group with the ID of groupId.
Due to the fluent coding style, we could write all of this on one line. This is normally preferable. In this example, a var was declared for the query class in order to demonstrate a way to interact with the query class without a specification class.
In order to use the assertCount method, the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access