protected abstract void OnAddRule(FakeObject fakeObject, CallRuleMetadata rule);
protected override void OnAddRule(FakeObject fakeObject, CallRuleMetadata rule) { // Do nothing }
/// <summary> /// Adds a fake object call to the current scope. /// </summary> /// <param name="fakeObject">The fake object.</param> /// <param name="rule">The rule to add.</param> internal void AddRule(FakeObject fakeObject, CallRuleMetadata rule) { fakeObject.AllUserRules.AddFirst(rule); this.OnAddRule(fakeObject, rule); }
private void ApplyRule(CallRuleMetadata rule, IWritableFakeObjectCall fakeObjectCall) { rule.CalledNumberOfTimes++; rule.Rule.Apply(fakeObjectCall); }