Home/Products/JustMock/JustMock Free Edition

Free Mocking Tool

JustMock Free Edition is a developer productivity tool designed to make it easy to create mock objects. JustMock Free Edition cuts your development time and helps you create better unit tests without requiring you to change your code. It allows you to perform fast and controlled tests that are independent of external dependencies like databases, web services, or proprietary code.

 

NuGet Package for Visual Studio

Why choose:

Arrange, Act, Assert Oriented

JustMock embraces the Arrange, Act, Assert (AAA) pattern for creating unit test mockings. This simple pattern makes it easy for developers to quickly and naturally mock objects in unit tests.

Unobtrusive Mocking

JustMock is POCO-friendly. You don’t have to add any additional code to your classes or methods to make them mockable. You can directly reference them in the mock object, regardless of implementation. Just mock it.

Error-free Mocking

Thanks to its strongly typed framework API JustMock detects errors in your mock definitions and highlights them in Visual Studio. JustMock’s API also fully leverages Visual Studio IntelliSense to make it easy to start mocking.

Extensive Documentation and Examples

JustMock Free Edition comes with extensive documentation and examples that will help you quickly get started with the tool.

Easy Migration to JustMock Standard Edition

When you decide you need a more powerful mocking experience you can easily migrate to the paid version of JustMock. With it you can mock objects like non-virtual methods, sealed classes and static methods and classes, non-public members and types.

Explore JustMock Commercial Edition

JustMock Editions Comparison


Feature JustMock Commercial Edition
JustMock Free Edition
Close The CallOriginal method marks a mocked method/property call that should execute the original method/property implementation. This topic goes through a number of scenarios where the CallOriginal method is usefull.
Call Original
Yes Yes
Close The DoNothing method is used to arrange that a call to a method or property should be ignored. It is applicable only for methods without a return value and property sets.
Do Nothing
Yes Yes
Close The DoInstead method is used to replace the actual implementation of a method with a mocked one. This topic goes through a number of scenarios where the DoInstead method is useful.
Do Instead
Yes Yes
Close The Initialize method is used for setting up all framework methods during test initialization.
Initialize
Yes Not Supported
Close The MustBeCalled method is used to assert that a call to a given method or property is made during the execution of a test.
Must Be Called
Yes Yes
Close The Raise method is used for raising mocked events. You can use custom or standard events.
Raise
Yes Yes
Close The Returns method is used with non void calls to ignore the actual call and return a custom value. This topic goes through a number of scenarios where the Returns method is useful.
Returns
Yes Yes
Close The Throws method is used to throw an exception when a given call is made. This topic goes through a number of scenarios where the Throws method is useful.
Throws
Yes Yes
Close Telerik JustMock allows you to mock generic classes/interfaces/methods in the same way as you do it for non-generic ones.
Generics
Yes Yes
Close By default Telerik JustMock uses loose mocks and allows you to call any method on a given type. No matter whether the method call is arranged or not you are able to call it. However, you may have a case where you want to enable only arranged calls and to reject any other calls. In such cases you need to set the to Strict when creating the mock.
Strict Mocking
Yes Yes
Close Mocking properties is similar to mocking methods, but there are a few cases that need special attention like mocking indexers and particular set operations.
Mock Properties
Yes Yes
Close Occurrence is used in conjunction with Mock.Assert and Mock.AssertSet to determine how many times a call has occurred.
Asserting Occurrences
Yes Yes
Close Matchers let you ignore passing actual values as arguments used in mocks. Instead, they give you the possibility to pass just an expression that satisfies the argument type or the expected value range.
Matchers
Yes Yes
Close Sequential mocking allows you to return different values on the same or different consecutive calls to one and the same type. In other words, you can set up expectations for successive calls of the same type.
Sequential Mocking
Yes Yes
Close Recursive mocks enable you to mock members that are obtained as a result of "chained" calls on a mock. For example, recursive mocking is useful in the cases when you test code like this: foo.Bar.Baz.Do("x").
Recursive Mocking
Yes Yes
Close With JustMock you can mock internal types with InternalsVisibleToAttribute the same way you mock public types. Without InternalsVisibleToAttribute you are forced to mock as you mock non-public members.
Mock Internal Types Via Proxy
Yes Yes
Close Microsoft SharePoint is a browser based web platform where you can set up Web sites to share and manage information and documents and publish reports in order to make it easier for people to work together.
SharePoint Mocking
Yes Not Supported
Close Telerik JustMock can be used in conjunction with Telerik OpenAccess to fake the data access layer to make it easier for you to test your target logic without worrying about its dependencies.
OpenAccess Mocking
Yes Not Supported
Close With Microsoft Entity Framework you develop data access application by using a conceptual application model instead of relational storage schema.
Entity Framework Mocking
Yes Not Supported
Close Final mocking is one of the advanced features supported in Telerik JustMock. It allows you to fake final method/property calls, set expectations and verify results using the AAA principle. Faking final or virtual method/property calls doesn't affect the way you write your tests, i.e. the same syntax is used for mocking both final and non-final calls.
Final Mocking
Yes Not Supported
Close Sealed mocking is one of the advanced features supported in Telerik JustMock. It allows you to fake sealed classes and calls to their methods/properties, set expectations and verify results using the AAA principle. Faking sealed classes and calls to their methods/properties doesn't affect the way you write your tests, i.e. the same syntax is used for mocking non sealed classes.
Sealed Mocking
Yes Not Supported
Close Static mocking is one of the advanced features supported in Telerik JustMock. It allows you to fake static method/property calls, set expectations and verify results using the AAA principle. Whether you mock static or instance calls there isn't much difference in the way your organize and write your tests.
Static Mocking
Yes Not Supported
Close Partial mocks allow you to mock some of the methods of a class while keeping the rest intact. Thus, you keep your original object, not a mock object, and you are still able to write your test methods in isolation. Partial mocking can be performed on both static and instance calls.
Partial Mocking
Yes Not Supported
Close Telerik JustMock enables you to mock methods from the .NET Framework, i.e. from MsCorlib. By adding some additional lines during your test class initialization you can easily mock even methods from MsCorlib.
MsCorlib Mocking
Yes Not Supported
Close In elevated mode, you can use Telerik JustMock to mock non-public members and types. That is useful when you want to isolate calls to non-public members.
Mocking Non-public Members and Types
Yes Not Supported
Close With JustMock you can mock LINQ queries with custom select.
Mocking LINQ Queries
Yes Not Supported
Free trial Download