public void Process(Invocation invocation) { this.wasCalled = true; this.calledInWrongOrder = (this.LastIdInOrder != this.arrangementId - 1); this.LastIdInOrder = this.arrangementId; this.InOrderExecutionLog += invocation.InputToString() + " called at:\n" + MockingContext.GetStackTrace(" "); if (this.calledInWrongOrder) { MockingContext.Fail("Last call executed out of order. Order of calls so far:\n{1}", invocation.InputToString(), InOrderExecutionMessage); } }
public void Process(Invocation invocation) { this.wasCalled = true; bool processedOnce = this.LastIdInOrder > -1; this.calledInWrongOrder = processedOnce && (this.LastIdInOrder - this.arrangementId) > 0 || (this.LastIdInOrder - this.arrangementId) < -1; this.LastIdInOrder = this.arrangementId; this.InOrderExecutionLog += invocation.InputToString() + " called at:\n" + MockingContext.GetStackTrace(" "); if (this.calledInWrongOrder) { MockingContext.Fail("{0}Last call executed out of order. Order of calls so far:\n{1}", this.message != null ? this.message + " " : "", InOrderExecutionMessage); } }
public void Process(Invocation invocation) { this.processedStackTrace = invocation.InputToString() + " called at:\n" + MockingContext.GetStackTrace(" "); }