public void Conditional() { var test = SqlExpression.FunctionCall("test"); var trueExp = SqlExpression.Constant(45); var falseExp = SqlExpression.FunctionCall("testReturn"); var condition = SqlExpression.Conditional(test, trueExp, falseExp); SerializeAndAssert(condition, (serialized, deserialized) => { Assert.AreEqual(SqlExpressionType.Conditional, deserialized.ExpressionType); Assert.IsInstanceOf <SqlFunctionCallExpression>(deserialized.TestExpression); Assert.IsInstanceOf <SqlConstantExpression>(deserialized.TrueExpression); Assert.IsInstanceOf <SqlFunctionCallExpression>(deserialized.FalseExpression); }); }