/// <summary> /// Configures the spy to call-through to the original implementation after /// recording the call. /// </summary> /// <returns>The spy.</returns> public SpyWithBehaviour CallThrough() { if (_spy.Key is Guid) { throw new InvalidOperationException("Cannot call through on dynamic spies."); } _spy.Behaviours.Clear(); var behaviour = new CallThroughBehaviour(); behaviour.UpdateLifetime(int.MaxValue); behaviour.ParameterChangesBeforeExecution = _parameterChanges; _spy.Behaviours.Enqueue(behaviour); return(new SpyWithBehaviour(_spy, behaviour)); }