DNN.Templates icon indicating copy to clipboard operation
DNN.Templates copied to clipboard

Add Unit Testing project to MVC Template

Open DotNetNuclear opened this issue 8 years ago • 1 comments

Hi Joe,

As I was putting together documentation for MVC development at Will Morgenweck's request, it became clear that documenting unit testing was going to be confusing unless we made some changes to the Mvc project template.

This pull request consists of the following:

  • The Mvc template will now create solution with two projects: the module project and a unit test project
  • The Unit Test project will have a sample unit test and mock repository to give developers guidance. It also builds and runs against the module project right out of the box.
  • Changes to the ItemController.cs in order to support injecting a mock ItemManager and testing environment variables such as ModuleContext to support unit test.

Any questions, let me know. [email protected]

Thanks! Scott

DotNetNuclear avatar Nov 13 '16 21:11 DotNetNuclear

@DotNetNuclear The template should be working from end to end but if I create module from your template and install it, it doesn't work as expected. I see errors while install and after dropping it on page as well.

Kindly fix the issues.

amarjit-dhunna avatar Feb 10 '17 22:02 amarjit-dhunna