internal override bool RecordCall(Step calledStep) { try { return base.RecordCall(calledStep); } catch (Exception) { invocationExceptionThrown = true; throw; } }
internal virtual bool RecordCall(Step calledStep) { foreach (var step in steps) { if (step == calledStep) { CountCall(calledStep); return true; } if (step is Loop) { var loop = (Loop) step; if (loop.RecordCall(calledStep)) return true; } step.EnsureComplete(calledStep + " was called"); } return false; }
internal static void Record(Step calledStep) { EnsureActiveSequence("Mock invocation"); Instance.RecordCall(calledStep); }
internal Step CreateStep(object setup, Times expectedCalls) { var step = new Step(expectedCalls, "''" + setup + "'"); LastCreatedActiveLoop().steps.Add(step); return step; }
private bool EnteringLoopWith(Step calledStep) { return !Started || calledStep.Complete; }
private void CountCall(Step calledStep) { if (EnteringLoopWith(calledStep)) { if (Started) ResetSteps(); calledStep.CountCall(); CountCall(); } else calledStep.CountCall(); }
private bool EnteringLoopWith(Step calledStep) { return(!Started || calledStep.Complete); }