NuGet JustMock

As most of us already know JustMock got  a free edition. The free edition is not a stripped down of the features of the full edition but I would rather say its a strip down of the type you can mock. Technically, free version runs on  proxy as full version runs on proxy + profiler. In full version, It switches to profiler when you are mocking final methods or sealed class or anything else that can not be done using inheritance. Like in full version you can mock non public methods , in free version you can still do it but it has to be virtual for protected or must be done through InternalsVisibleTo attribute for internal virtual methods (If you have access to the source and can apply the attribute).

Now, you can get a copy of free edition from the product page. Install it and off you go. But it is also exposed to NuGet. Those of you are not familiar with NuGet (that will be odd). But still NuGet is the centralized package manager from Microsoft that cuts the workflow of manual inclusion of  libraries in your project. I think NuGet in future will limit the scope of  “.vsi” packages and installers because of its ease (except in some cases). Its similar to ruby gems. In ruby, virtually you can install any library in this way “gem  install <target_library>” and you are off to go. It will check the dependencies, install them or less prompt with the steps you need to do.


Now sticking to the post, to get started you first need to install NuGet package manager. Once you have completed the step pressing “Ctrl + W, Ctrl + Z” it will bring up an console like one below:



Once you are here, you just have to type “install-package justmock”


Next, it will should print the confirmation when the installation is complete:


Moving to visual studio solution explorer, you will now see:


Finally, NuGet is still in its early ages and steps that are shown here may not remain the same in coming releases, but feel free to enjoy what is out there right now. Regarding JustMock free edition, there is a nice post by Phil Japikse at Introducing JustMock Free Edition. I think its worth checking if not already.


Have fun and happy holidays!


  • Give us few reasons why people should bother to use it instead of those time and proven open source mocking tools, What new things it brings to the table, or you are only targeting the TypeMock userbase?

  • @Higgen
    JustMock I think puts great value to users who already own telerik subscription as well as gives competative&nbsp;choice among the tools already available. JustMock also has a free edition that people can use without any restrictions in their personal or OS projects and when needed can easily upgrade to paid version for more comprehensive support and mocking more complex types like LINQ or MsCorlib (JustMock can mock all MsCorlib types) or hard to mock classes.
    Additionally, JustMock commited to make mocking simpler thus provides a simplistic API &nbsp;and more better documention (i think). Also, JustMock tries to cut unnessary noises where possible, like&nbsp;cutting the&nbsp;mock specific attribute in every test method, etc.
    Finally, having dual architecture :&nbsp;proxy&nbsp;+ profiler increases test performance as profiler&nbsp;is slow&nbsp;(in cases)&nbsp;and you dont need it for mocking virtual members.
    These are just my few cents from my point of view&nbsp; despite the fact that i work for telerik.

Comments have been disabled for this content.