Reader small image

You're reading from  Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition

Product typeBook
Published inMar 2020
PublisherPackt
ISBN-139781838643812
Edition2nd Edition
Right arrow
Author (1)
Simon Buxton
Simon Buxton
author image
Simon Buxton

Simon Buxton has worked with Dynamics 365 Finance and Supply Chain Management since its earliest incarnations, starting with the product in early 1999 when Dynamics 365 Finance and Supply Chain Management was known as Damgaard Axapta 1.5. Simon has been the technical lead on many highly challenging technical projects in countries all around the world. These projects included complex integrations with on-premises and external systems, ISV solutions, and many technically challenging customer solutions. Now working with Binary, he was part of a team that implemented the first Dynamics 365 Finance and Supply Chain Management implementation as part of the Community Technical Preview (CTP) program, which led to the close working relationship with Microsoft that made this book possible
Read more about Simon Buxton

Right arrow

Creating a unit test project

To write a test case, we need to reference the Testing Essentials package. This package is not deployed to sandbox or production environments, which means that any deployment that depends on the test framework will fail. Therefore, we must have a new package for our unit tests. The best way to write tests is to write them as we would write our main code. Therefore, we would add a test project to the same solution as the development project.

Let's say we created a project for a credit check change called ConSalesCreditCheck in the Contoso package. The structure would be similar to the following:

  • Solution: ConSalesCreditCheck
    • Project: ConSalesCreditCheck (Package Contoso)
    • Project: ConSalesCreditCheckTest (Package ContosoTest)
Test packages must always end in Test; normal projects must not. This is because we usually exclude test projects...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition
Published in: Mar 2020Publisher: PacktISBN-13: 9781838643812

Author (1)

author image
Simon Buxton

Simon Buxton has worked with Dynamics 365 Finance and Supply Chain Management since its earliest incarnations, starting with the product in early 1999 when Dynamics 365 Finance and Supply Chain Management was known as Damgaard Axapta 1.5. Simon has been the technical lead on many highly challenging technical projects in countries all around the world. These projects included complex integrations with on-premises and external systems, ISV solutions, and many technically challenging customer solutions. Now working with Binary, he was part of a team that implemented the first Dynamics 365 Finance and Supply Chain Management implementation as part of the Community Technical Preview (CTP) program, which led to the close working relationship with Microsoft that made this book possible
Read more about Simon Buxton