Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition
by Simon Buxton
How it works...
The first thing you may have noticed is that we made every class and method non-extensible by making the classes final and the methods non-hookable. This is so that no other party can affect our tests. The obvious question is, "What if the customer has used Chain of Command (CoC) to alter how the code behaves? Surely we have to adjust the tests so that they will pass?" The answer is no; any changes brought about through CoC should not break the standard code as this protects against future regression in our code. The standard tests should pass, even with our code changes – and our code must also pass. We are augmenting standard behavior.
By creating the AtlData class, we have simplified the creation of the test case by bringing ...
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