Inheritance: BinaryExpression
コード例 #1
0
        public void EvaluateConcatenateExpressionUsingNulls()
        {
            IExpression expression = new ConcatenateExpression(new ConstantExpression(null), new ConstantExpression(null));

            Assert.AreEqual(string.Empty, expression.Evaluate(null));

            expression = new ConcatenateExpression(new ConstantExpression("foo"), new ConstantExpression(null));

            Assert.AreEqual("foo", expression.Evaluate(null));

            expression = new ConcatenateExpression(new ConstantExpression(null), new ConstantExpression("bar"));

            Assert.AreEqual("bar", expression.Evaluate(null));
        }
コード例 #2
0
        public void EvaluateConcatenateExpressionUsingIntegers()
        {
            IExpression expression = new ConcatenateExpression(new ConstantExpression(12), new ConstantExpression(34));

            Assert.AreEqual("1234", expression.Evaluate(null));
        }