public void TestRightNull() { var expression = new NotEqualExpression( Mock.Of <IExpression>(e => e.Evaluate(It.IsAny <IDictionary <string, object> >()) == (object)false), Mock.Of <IExpression>(e => e.Evaluate(It.IsAny <IDictionary <string, object> >()) == (object)null), ExpressiveOptions.None); Assert.AreEqual(true, expression.Evaluate(null)); }
public static void TestEvaluate(object lhs, object rhs, object expectedValue) { var expression = new NotEqualExpression( Mock.Of <IExpression>(e => e.Evaluate(It.IsAny <IDictionary <string, object> >()) == lhs), Mock.Of <IExpression>(e => e.Evaluate(It.IsAny <IDictionary <string, object> >()) == rhs), new Context(ExpressiveOptions.None)); Assert.That(expression.Evaluate(null), Is.EqualTo(expectedValue)); }