New to Telerik JustMockStart a free 30-day trial

IOccurrence

Interface

Defines occurrence for a specific call.

Definition

Namespace:Telerik.JustMock.Expectations.Abstraction

Assembly:Telerik.JustMock.dll

Syntax:

C#
public interface IOccurrence

Derived Classes: ActionExpectationCollectionExpectation<TReturn>CommonExpectation<TContainer>FuncExpectation<TReturn>

Methods

Specifies how many times the call should occur.

C#
IDisposable Occurs(int numberOfTimes, string message = null)
Parameters:numberOfTimesint

Specified number of times

messagestring
Returns:

IDisposable

Disposable object that can be used to disable this arrangement.

Specifies how many times at least the call should occur.

C#
IDisposable OccursAtLeast(int numberOfTimes, string message = null)
Parameters:numberOfTimesint

Specified number of times

messagestring
Returns:

IDisposable

Disposable object that can be used to disable this arrangement.

Specifies how many times maximum the call can occur.

C#
IDisposable OccursAtMost(int numberOfTimes, string message = null)
Parameters:numberOfTimesint

Specified number of times

messagestring
Returns:

IDisposable

Disposable object that can be used to disable this arrangement.

Specifies that the call must never occur.

C#
IDisposable OccursNever(string message = null)
Parameters:messagestringReturns:

IDisposable

Disposable object that can be used to disable this arrangement.

Specifies that the call must occur once.

C#
IDisposable OccursOnce(string message = null)
Parameters:messagestringReturns:

IDisposable

Disposable object that can be used to disable this arrangement.