Martin "Goshoom" Dráb – Dynamics AX, .NET and Everything

Menu

Archive of posts tagged unit test

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 …

In the previous post, I talked about what unit testing is and how such tests should be designed. Let’s jump straight into X++ code this time. Unit tests are methods and we need a class to hold them. Such a container of test methods is called a test case and it’s simply a class extending …

I believe that unit testing is extremely important and that the lack of its adoption in Dynamics AX is a serious problem. One reason why people don’t write unit tests is that they don’t really know how. Let’s if I can help a little bit. My intention is neither to write a theoretical work nor …

This post is based on my replay in Dynamics Community forum, therefore if you read it there, you can safely move on. When I hear “automated testing” in Dynamics AX world, people almost always mean replicating what a human tester does – opening a form, clicking around and so on. It makes some sense, because …

Why do I link AX, temporary table, unit test and DuplicateKeyException? Because if I put them together, it behaves quite strangely. I have a temporary table, I insert some data into it and in an exceptional case, when a duplicity occurs, I catch the DuplicateKeyException and simply ignore such insert. And it works correctly. The …