public void SetEvaluatorForCheckType(string checkType, ICheckEvaluator evaluator) { if (evaluator == null) { throw new ArgumentNullException(); } this.evaluators.Add(checkType, evaluator); }
public void SetEvaluatorStoreEvaluator() { EvaluationContext context = new EvaluationContext(); MockCheckEvaluator evaluator = new MockCheckEvaluator(); context.SetEvaluatorForCheckType("myType", evaluator); ICheckEvaluator evaluator2 = context.GetEvaluatorForCheckType("myType"); Assert.AreSame(evaluator, evaluator2); }