public void ShouldCreateConditionalExpression() { var factory = new DbExpressionFactory(); var expression = factory.Conditional(factory.Column("SomeColumn") == factory.Constant("SomeValue"), factory.Constant("ValueWhenTrue"), factory.Constant("ValueWhenFalse")); Assert.IsNotNull(expression.Condition); Assert.IsNotNull(expression.IfFalse); Assert.IsNotNull(expression.IfTrue); Assert.IsTrue(expression.ExpressionType == DbExpressionType.Conditional); }
public void ShouldCreateConditionalExpression() { var factory = new DbExpressionFactory(); var expression = factory.Conditional(factory.Column("SomeColumn") == factory.Constant("SomeValue"), factory.Constant("ValueWhenTrue"), factory.Constant("ValueWhenFalse")); Assert.IsNotNull(expression.Condition); Assert.IsNotNull(expression.IfFalse); Assert.IsNotNull(expression.IfTrue); Assert.IsTrue(expression.ExpressionType == DbExpressionType.Conditional); }