moq Getting started with moq Installation or Setup


  1. Select the project you want to add the reference to Moq.
  2. Open Nuget for this project.
  3. Select "Browse" than type "moq" at the search box.
  4. Select "Moq" and than click on Install.

enter image description here

Following these steps will install the Moq package and will add a reference to it in the selected project references. After completing these steps Moq can be used in the unit test project by simply declaring it in the test classes files:

Using Moq;