Exemplo n.º 1
0
        public void Invalid_ParseArithmeticOperator_BinaryExpression()
        {
            Person person = null;
            Expression <Func <object> > expression = () => person.Name ?? "SomeName";

            Exception ex = Assert.Throws <ArgumentException>(() => ExpressionProcessor.ParseArithmeticOperator(
                                                                 (BinaryExpression)expression.Body));

            Assert.Equal("Invalid expression.", ex.Message);
        }