Telerik® JustMock™ by Progress

Mocks with Behavior.CallOriginal will follow the original implementation of the mocked type for every non explicitly arranged function/member.

Syntax

Mock.Create<T>(Behavior.CallOriginal);

Examples

Basic CallOriginal Example

Assume the following class:
To show how CallOriginal mocks behave, we have the next example:
Here, we create a mock of the Log class, with Behavior.CallOriginal and call a not implemented method. This method follows its original logic and throws a NotImplementedException.

Arranging CallOriginal Mock

We are free to further arrange mocks with Behavior.CallOriginal, as shown in the next example:

See Also