Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Microsoft Dynamics NAV 2016

You're reading from   Mastering Microsoft Dynamics NAV 2016 The compilation of best skillset to harness Microsoft Dynamics NAV for Administrators, Consultants, and Developers

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781786464309
Length 450 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Rabindra Sah Rabindra Sah
Author Profile Icon Rabindra Sah
Rabindra Sah
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Microsoft Dynamics NAV Installation FREE CHAPTER 2. Upgraded Features and Configuration in Dynamics NAV 2016 3. The C/AL and VB Programming 4. Testing and Debugging 5. Design and Development Considerations 6. Version Control and Code Management 7. Tuning Up the NAV System 8. Security in Dynamics NAV 2016 9. Upgrade and Migration 10. Interfacing NAV with Other Applications 11. Extending Dynamics NAV 2016 12. The Future of NAV

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image