Variables

expectation

private IExpectation expectation

expectationReplaced

private bool expectationReplaced

repository

private MockRepository repository

record

private readonly RecordMockState record

proxy

private IMockedObject proxy

Properties

Repeat

public IRepeat Repeat { get }

Functions

MethodOptions

public MethodOptions(MockRepository repository,
RecordMockState record,
IMockedObject proxy,
IExpectation expectation)

Constraints

public IMethodOptions Constraints(params AbstractConstraint[] constraints)

Callback

public IMethodOptions Callback(Delegate callback)

Do

public IMethodOptions Do(Delegate action)

Return

public IMethodOptions Return(object objToReturn)

Throw

public IMethodOptions Throw(Exception exception)

IgnoreArguments

public IMethodOptions IgnoreArguments()

CallOriginalMethod

public void CallOriginalMethod()

CallOriginalMethod

public IMethodOptions CallOriginalMethod(OriginalCallOptions options)

PropertyBehavior

public IMethodOptions PropertyBehavior()

GetEventRaiser

public IEventRaiser GetEventRaiser()

OutRef

public IMethodOptions OutRef(params object[] parameters)

AssertExpectationOnPropertyWithGetterAndSetter

private void AssertExpectationOnPropertyWithGetterAndSetter()

AssertLastMethodWasEventAddOrRemove

private void AssertLastMethodWasEventAddOrRemove()

GetPropertyFromMethod

private PropertyInfo GetPropertyFromMethod(MethodInfo method)

AssertMethodImplementationExists

private void AssertMethodImplementationExists()

ReplaceExpectation

private void ReplaceExpectation(IExpectation anyArgsExpectation)

Twice

public IMethodOptions Twice()

Once

public IMethodOptions Once()

AtLeastOnce

public IMethodOptions AtLeastOnce()

Never

public IMethodOptions Never()

Message

public IMethodOptions Message(string documentationMessage)

Any

public IMethodOptions Any()

Times

public IMethodOptions Times(int min,
int max)

Times

public IMethodOptions Times(int count)
Allows to define what would happen when a method is called.
Allows to specified the number of times a method is called.
private IExpectation expectation
private bool expectationReplaced
private MockRepository repository
private readonly RecordMockState record
private IMockedObject proxy
public IRepeat Repeat { get }
public MethodOptions(MockRepository repository,
RecordMockState record,
IMockedObject proxy,
IExpectation expectation)
public IMethodOptions Constraints(params AbstractConstraint[] constraints)
public IMethodOptions Callback(Delegate callback)
public IMethodOptions Do(Delegate action)
public IMethodOptions Return(object objToReturn)
public IMethodOptions Throw(Exception exception)
public IMethodOptions IgnoreArguments()
public void CallOriginalMethod()
public IMethodOptions PropertyBehavior()
public IEventRaiser GetEventRaiser()
public IMethodOptions OutRef(params object[] parameters)
private void AssertExpectationOnPropertyWithGetterAndSetter()
private void AssertLastMethodWasEventAddOrRemove()
private PropertyInfo GetPropertyFromMethod(MethodInfo method)
private void AssertMethodImplementationExists()
private void ReplaceExpectation(IExpectation anyArgsExpectation)
public IMethodOptions Twice()
public IMethodOptions Once()
public IMethodOptions AtLeastOnce()
public IMethodOptions Never()
public IMethodOptions Message(string documentationMessage)
public IMethodOptions Any()
public IMethodOptions Times(int min,
int max)