locked
Which extension should I use in order to include Moq? RRS feed

  • Question

  • I'm changing my direction a little bit by thinking of using a Mocking framework. I'm using the following MSDN article as a guideline: Entity Framework Testing with a Mocking Framework (EF6 onwards) The one I've heard of is Moq, so from within VS 2015 I did a search against the Visual Studio Gallery on "moq" and I've found 4:

    1. Unit Test Boilderplate Generator
    2. Dnet.Templates
    3. Enterprise Application SOLID Solution
    4. MockIt.Vsix

    We've never used a mocking framework before so I've no idea which of the above 4 I should use, if indeed any of them are correct. If one of the above is the Moq commonly used by people, which is it, please?


    Rod

    Monday, November 7, 2016 9:09 PM

Answers

  • I use moq often and really like it.  just install the nuget package to your unit test project

    for example

    Install-Package Moq -Pre
    or if you don't want an alpha version:
    Install-Package Moq -Version 4.5.23

    here it is on git:

    https://github.com/moq/moq4


    Tim


    • Edited by TimJim Monday, November 7, 2016 9:26 PM clarity
    • Marked as answer by Rod at Work Tuesday, November 8, 2016 3:20 PM
    Monday, November 7, 2016 9:25 PM

All replies

  • I use moq often and really like it.  just install the nuget package to your unit test project

    for example

    Install-Package Moq -Pre
    or if you don't want an alpha version:
    Install-Package Moq -Version 4.5.23

    here it is on git:

    https://github.com/moq/moq4


    Tim


    • Edited by TimJim Monday, November 7, 2016 9:26 PM clarity
    • Marked as answer by Rod at Work Tuesday, November 8, 2016 3:20 PM
    Monday, November 7, 2016 9:25 PM
  • Oh, I see what I was doing wrong. I needed to install the Moq package through the NuGet Package Manager Console. I was trying to do it through Extensions and Updates.

    Thank you, Tim.


    Rod

    Tuesday, November 8, 2016 3:23 PM