Book Image

Mastering Microsoft Dynamics NAV 2016

By : Rabindra Sah
Book Image

Mastering Microsoft Dynamics NAV 2016

By: Rabindra Sah

Overview of this book

The book begins by giving you a brief introduction to setting up your NAV environment and shows you how to install and configure it according to your requirements. You will then dive deep into the latest design patterns, network architecture, and topologies. We will show you how you can integrate NAV with the Microsoft platform, and secure your deployment by managing roles and permissions. Moving on, we will explain how to monitor and manage server instances using the Administration tool. We’ll discuss how you can take advantage of the expanded extensibility and connectivity capabilities for a tighter integration with the cloud as well as handheld devices. Then, we’ll show you how you can make use of the PowerBI capabilities that have been built into Dynamics NAV. By the end of the book, you will be confident in developing and administering a Dynamics NAV implementation that will leverage all of the new features.
Table of Contents (19 chapters)
Mastering Microsoft Dynamics NAV 2016
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Testability framework build in NAV


If you have worked with C# code, then this part will be easy to relate to. All the functions have a prefix that defines the characteristic of the function. This is new in Microsoft Dynamics NAV, and personally, I think it is cool to have this in C/AL. The following screenshot shows a few examples of functions with prefixes:

In the essential part of the testability framework, we have the following four main parts:

  • Test codeunits

  • ASSERTERROR

  • UI handlers

  • Test runner/test isolation

The codeunits have a subtype. The subtype has a number of options such as Normal, Test, TestRunner, and Upgrade. If we select Test as a subtype of our codeunit, this means that we are able to create code here as a test code:

Note

The code which inserts a value inside a table written in the Test codeunit does not actually enter the value into the table. The process is confined to only testing purposes. It virtually pushes the data and tests the success or failure condition.

When you create...