public void InappropriateExpressionType()
        {
            IQueryable <int> query = new EnumerableQuery <int>(Expression.Constant(Math.PI));

            Assert.NotNull(query.Expression);
            AssertExtensions.Throws <ArgumentException>(null, () => query.GetEnumerator());
        }
        public void NullExpressionAllowed()
        {
            IQueryable <int> query = new EnumerableQuery <int>((Expression)null);

            Assert.Null(query.Expression);
            Assert.Throws <ArgumentNullException>(() => query.GetEnumerator());
        }
        public void NullEnumerableConstantNullExpression()
        {
            IQueryable <int> query = new EnumerableQuery <int>((IEnumerable <int>)null);
            var exp = (ConstantExpression)query.Expression;

            Assert.Same(query, exp.Value);
            Assert.Throws <InvalidOperationException>(() => query.GetEnumerator());
        }