Variables

recordedActions

protected IList recordedActions

recorderToCall

protected IMethodRecorder recorderToCall

replayerToCall

protected IMethodRecorder replayerToCall

parentRecorder

protected IMethodRecorder parentRecorder

replayersToIgnoreForThisCall

private IList replayersToIgnoreForThisCall

repeatableMethods

private ProxyMethodExpectationsDictionary repeatableMethods

recursionDepth

private int recursionDepth

Functions

MethodRecorderBase

public MethodRecorderBase()

MethodRecorderBase

public MethodRecorderBase(IMethodRecorder parentRecorder)

Record

public void Record(object proxy,
MethodInfo method,
IExpectation expectation)

GetRecordedExpectation

public IExpectation GetRecordedExpectation(IInvocation invocation,
object proxy,
MethodInfo method,
object[] args)

GetAllExpectationsForProxyAndMethod

public abstract ExpectationsList GetAllExpectationsForProxyAndMethod(
   object proxy,
   MethodInfo method
)

GetAllExpectationsForProxy

public ExpectationsList GetAllExpectationsForProxy(object proxy)

ReplaceExpectation

public void ReplaceExpectation(object proxy,
MethodInfo method,
IExpectation oldExpectation,
IExpectation newExpectation)

TryReplaceRepeatableExpectation

private bool TryReplaceRepeatableExpectation(MethodInfo method,
IExpectation newExpectation,
IExpectation oldExpectation,
object proxy)

RemoveAllRepeatableExpectationsForProxy

public void RemoveAllRepeatableExpectationsForProxy(object proxy)

Properties

HasExpectations

public bool HasExpectations { get }

Functions

AddToRepeatableMethods

public void AddToRepeatableMethods(object proxy,
MethodInfo method,
IExpectation expectation)

RemoveExpectation

public void RemoveExpectation(IExpectation expectation)

AddRecorder

public void AddRecorder(IMethodRecorder recorder)

MoveToPreviousRecorder

public bool MoveToPreviousRecorder()

MoveToParentReplayer

public void MoveToParentReplayer()

GetRecordedExpectationOrNull

public IExpectation GetRecordedExpectationOrNull(object proxy,
MethodInfo method,
object[] args)

ClearReplayerToCall

public void ClearReplayerToCall(IMethodRecorder childReplayer)

UnexpectedMethodCall

public abstract ExpectationViolationException UnexpectedMethodCall(
   IInvocation invocation,
   object proxy,
   MethodInfo method,
   object[] args
)

GetExpectedCallsMessage

public abstract string GetExpectedCallsMessage()

DoGetRecordedExpectationOrNull

protected abstract IExpectation DoGetRecordedExpectationOrNull(
   object proxy,
   MethodInfo method,
   object[] args
)

DoRecord

protected abstract void DoRecord(object proxy,
MethodInfo method,
IExpectation expectation)

DoGetRecordedExpectation

protected abstract IExpectation DoGetRecordedExpectation(
   IInvocation invocation,
   object proxy,
   MethodInfo method,
   object[] args
)

DoGetAllExpectationsForProxy

protected abstract ExpectationsList DoGetAllExpectationsForProxy(object proxy)

DoReplaceExpectation

protected abstract void DoReplaceExpectation(object proxy,
MethodInfo method,
IExpectation oldExpectation,
IExpectation newExpectation)

Properties

DoHasExpectations

protected abstract bool DoHasExpectations { get }

Functions

DoRemoveExpectation

protected abstract void DoRemoveExpectation(IExpectation expectation)

DoAddRecorder

protected abstract void DoAddRecorder(IMethodRecorder recorder)

ShouldConsiderThisReplayer

protected bool ShouldConsiderThisReplayer(IMethodRecorder replayer)

GetRepeatableExpectation

public IExpectation GetRepeatableExpectation(object proxy,
MethodInfo method,
object[] args)

ExpectationNotOnList

private void ExpectationNotOnList(ExpectationsList list,
IExpectation expectation)
protected IList recordedActions
protected IMethodRecorder recorderToCall
protected IMethodRecorder replayerToCall
protected IMethodRecorder parentRecorder
private IList replayersToIgnoreForThisCall
private ProxyMethodExpectationsDictionary repeatableMethods
private int recursionDepth
public MethodRecorderBase()
public void Record(object proxy,
MethodInfo method,
IExpectation expectation)
public IExpectation GetRecordedExpectation(IInvocation invocation,
object proxy,
MethodInfo method,
object[] args)
public abstract ExpectationsList GetAllExpectationsForProxyAndMethod(
   object proxy,
   MethodInfo method
)
public ExpectationsList GetAllExpectationsForProxy(object proxy)
public void ReplaceExpectation(object proxy,
MethodInfo method,
IExpectation oldExpectation,
IExpectation newExpectation)
private bool TryReplaceRepeatableExpectation(MethodInfo method,
IExpectation newExpectation,
IExpectation oldExpectation,
object proxy)
public void RemoveAllRepeatableExpectationsForProxy(object proxy)
public bool HasExpectations { get }
public void AddToRepeatableMethods(object proxy,
MethodInfo method,
IExpectation expectation)
public void RemoveExpectation(IExpectation expectation)
public void AddRecorder(IMethodRecorder recorder)
public bool MoveToPreviousRecorder()
public void MoveToParentReplayer()
public IExpectation GetRecordedExpectationOrNull(object proxy,
MethodInfo method,
object[] args)
public void ClearReplayerToCall(IMethodRecorder childReplayer)
public abstract ExpectationViolationException UnexpectedMethodCall(
   IInvocation invocation,
   object proxy,
   MethodInfo method,
   object[] args
)
public abstract string GetExpectedCallsMessage()
protected abstract IExpectation DoGetRecordedExpectationOrNull(
   object proxy,
   MethodInfo method,
   object[] args
)
protected abstract void DoRecord(object proxy,
MethodInfo method,
IExpectation expectation)
protected abstract IExpectation DoGetRecordedExpectation(
   IInvocation invocation,
   object proxy,
   MethodInfo method,
   object[] args
)
protected abstract ExpectationsList DoGetAllExpectationsForProxy(object proxy)
protected abstract void DoReplaceExpectation(object proxy,
MethodInfo method,
IExpectation oldExpectation,
IExpectation newExpectation)
protected abstract bool DoHasExpectations { get }
protected abstract void DoRemoveExpectation(IExpectation expectation)
protected abstract void DoAddRecorder(IMethodRecorder recorder)
protected bool ShouldConsiderThisReplayer(IMethodRecorder replayer)
public IExpectation GetRepeatableExpectation(object proxy,
MethodInfo method,
object[] args)
private void ExpectationNotOnList(ExpectationsList list,
IExpectation expectation)