public void ParseConstantExpressions()
{
IExpression expression;
expression = this.ParseExpression("1");
Assert.IsNotNull(expression);
Assert.IsInstanceOfType(expression, typeof(ConstantExpression));
Assert.AreEqual(1, expression.Evaluate(null));
expression = this.ParseExpression("1.2");
Assert.IsNotNull(expression);
Assert.IsInstanceOfType(expression, typeof(ConstantExpression));
Assert.AreEqual(1.2, expression.Evaluate(null));
expression = this.ParseExpression("false");
Assert.IsNotNull(expression);
Assert.IsInstanceOfType(expression, typeof(ConstantExpression));
Assert.IsFalse((bool)expression.Evaluate(null));
expression = this.ParseExpression("\"foo\"");
Assert.IsNotNull(expression);
Assert.IsInstanceOfType(expression, typeof(ConstantExpression));
Assert.AreEqual("foo", expression.Evaluate(null));
Assert.IsNull(this.ParseExpression(string.Empty));
}