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

Writing your own Test unit


Writing your own Test unit is very important, not just to test your code but also to give you an eagle's-eye view on how your code is actually interacting with the system. It gives your coding a meaning, and allows others to understand and relate to your development. Writing a unit test involves basically four steps as shown in the following diagram:

We first set up our data, or create the records that we will be testing later, using some statements. A statement might be an error message, value checking, confirmation, and others. After we get the statement in exercise, we verify our result with the result that is intended from our code that is being tested. If the verification is complete, then we tear down the setup data, and present the success and failure result so as to document the test.

For the sake of writing a simple unit test, let us take an example of a simple error message. While creating a new item, if you choose the item tracking code whose SNSpecific...

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