public void TestCaseEvaluation() { var @operator = new SequenceOperator(TypeConverter); var enumerable = @operator.Evaluate(EmptyEvaluationContext, 1.8, 2.1) as IEnumerable <int>; Assert.IsNotNull(enumerable); Assert.AreEqual("1,2", string.Join(",", enumerable)); enumerable = @operator.Evaluate(EmptyEvaluationContext, 1.1, 1.8) as IEnumerable <int>; Assert.IsNotNull(enumerable); Assert.AreEqual("1", string.Join(",", enumerable)); enumerable = @operator.Evaluate(EmptyEvaluationContext, 2, 1) as IEnumerable <int>; Assert.IsNull(enumerable); }
public void TestCaseEvaluationExceptions() { var @operator = new SequenceOperator(TypeConverter); ExpectArgumentNullException("context", () => @operator.Evaluate(null, 1, 2)); ExpectArgumentNullException("context", () => @operator.EvaluateLhs(null, 1, out object dummy)); }