JustMock

This section covers features from Telerik JustMock used in basic testing scenarios like:

  • Mocking interfaces
  • Mocking virtual and abstract methods and properties
  • Generic mocking
  • Sequential mocking
  • Recursive mocking

The topics in this section describe how to fake instances of objects, control method/property behavior, assert calls, raise events, throw exceptions from mocks, use ref and out parameters.

In This Section

Arrange Act Assert
Describes the Arrange Act Assert pattern.
Rapid Testing With JustCode
Describes how Telerik JustMock and JustCode are used together for faster unit test writing.
Mock Behaviors
Describes different mock behaviors.
Mock
Describes how to set different arrangements.
Mock
Describes the Mock class, how to use it in your unit tests and commonly used methods in the Arrange step like CallOriginal, DoInstead, DoNothing, Initialize, MustBeCalled, Raise, Raises, Returns, and Throws.
Generics
Describes how to mock generic types and members.
Mock Properties
Describes how to mock properties' set and get operations as well as indexers.
Asserting Occurrence
Describes how to determine how many times a call has occurred.
Matchers
Describes how to use matchers to satisfy an argument type or expected value range condition in a mock.
Fluent Mocking
Describes how to use fluent assertions.
Sequential Mocking
Describes how to return different values on the same or different consecutive calls to one and the same type.
Recursive Mocking
Describes how to mock members that are obtained as a result of "chained" calls on a mock.
Mock Internal Types Via Proxy
Describes how to mock internal types via proxy.
Automocking
Describes how to use automocking.
Create Mocks By Example
Describes how to create mocks by example.
Debug View
Describes how to debug your tests more efficiently.

Related Sections

Advanced Usage
Learn how to use Telerik JustMock in elevated scenarios like static, sealed, final and partial mocking, mocking framework methods, mocking non-public members and mocking LINQ queries.

See Also