To create the unit test project, follow these steps:
- Select Dynamics 365 for Operations | Create model from the top menu and complete the Create model form as follows:
Field |
Value |
Model name |
ConWHSVehicleManagementTest |
Model publisher |
Contoso IT |
Layer |
VAR |
Model description |
Test cases for the ConWHSVehicleManagement package |
Model display name |
ConWHSVehicleManagementTest |
The suffix is important and should always be Test.
- Click on Next.
- Select Create new package and click on Next.
- Select ConWHSVehicleManagement, ConWHSVehicleManagementFormAdaptor, ApplicationFoundation, and TestEssentials from the Packages [Models] list and click on Next.
Model packages may be required, depending on the code we need to write.
- Uncheck the default for creating a project, but leave the default option of making the new model the default for new projects. Click on OK.
- Right-click on the solution node in the Solution Explorer and choose Add | New project....
- In the New Project window, ensure that the Dynamics 365 for Operations template is selected in the left pane, and Operations Project is selected in the right. Enter ConWHSVehicleManagementTest as Name and click on OK.