示例#1
0
		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);
			}
		}
示例#2
0
        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);
            }
        }
示例#3
0
        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);
            }
        }
示例#4
0
 public void Process(Invocation invocation)
 {
     this.processedStackTrace = invocation.InputToString() + " called at:\n" + MockingContext.GetStackTrace("    ");
 }