Unit testing in AX – Dependencies

In my previous post on unit testing, I explained how to handle a few simple situations, nevertheless things often get more complicated. One such complication occurs if the class that you want to test uses other objects. It may be a problem for several reasons – it’s code that we don’t want to test in …

Continue reading ‘Unit testing in AX – Dependencies’ »

Decorator pattern and postings to general ledger

In this article, I want to use a real (albeit simplified) example to show an application of the Decorator pattern in Dynamics AX and the related refactoring. The requirement was something like this: “During the posting of an Expense Report (Expense Management module), find the maximum allowed amount, lower the transaction amount to this limit …

Continue reading ‘Decorator pattern and postings to general ledger’ »