private void TestFromBoolean(_Boolean x, Double?expectedValue) { _Double expr = (_Double)x; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(x, typeof(bool?), typeof(Double?)); expr.VerifyEval(expectedValue); }
private void TestFromDouble(Double?x, Int32?expectedValue) { _Double column1 = x; _Int32 expr = (_Int32)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(Double?), typeof(Int32?)); expr.VerifyEval(expectedValue); }
private void TestNegate(Double?x, Double?expectedValue) { _Double column = x; var expr = -column; var dbExpr = (DbUnaryExpression)expr.DbExpression; dbExpr.Verify(DbUnaryExpressionKind.Negate, column); expr.VerifyEval(expectedValue); }
private void TestCastToString(Double?x, String expectedValue) { _Double column1 = x; _String expr = (_String)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(Double?), typeof(String)); expr.VerifyEval(expectedValue); }
private void TestFromString(String x, Double?expectedValue) { _String column1 = x; _Double expr = (_Double)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(String), typeof(Double?)); expr.VerifyEval(expectedValue); }
private void TestFromDecimal(Decimal?x, Double?expectedValue) { _Decimal column1 = x; _Double expr = (_Double)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(Decimal?), typeof(Double?)); expr.VerifyEval(expectedValue); }
private void TestFromDouble(Double?x, Single?expectedValue) { _Double column1 = x; _Single expr = (_Single)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(Double?), typeof(Single?)); expr.VerifyEval(expectedValue); }
private void TestSubstract(Double?x, Double?y, Double?expectedValue) { _Double column1 = x; _Double column2 = y; var expr = column1 - column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.Substract, column1, column2); expr.VerifyEval(expectedValue); }
private void TestNotEqual(Double?x, Double?y, bool?expectedValue) { _Double column1 = x; _Double column2 = y; var expr = column1 != column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.NotEqual, column1, column2); expr.VerifyEval(expectedValue); }
private void TestGreaterThan(Double?x, Double?y, bool?expectedValue) { _Double column1 = x; _Double column2 = y; var expr = column1 > column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.GreaterThan, column1, column2); expr.VerifyEval(expectedValue); }
private void TestMultiply(Double?x, Double?y, Double?expectedValue) { _Double column1 = x; _Double column2 = y; var expr = column1 * column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.Multiply, column1, column2); expr.VerifyEval(expectedValue); }
private void TestConst(Double?x) { _Double column = _Double.Const(x); column.VerifyConst(x); }
private void TestImplicit(Double?x) { _Double column = x; column.VerifyParam(x); }
/// <summary>Creates a column of parameter expression.</summary> /// <param name="x">The value of the parameter expression.</param> /// <param name="sourceColumn">The value which will be passed to <see cref="DbParamExpression.SourceColumn"/>.</param> /// <returns>The column of parameter expression.</returns> public static _Double Param(Double?x, _Double sourceColumn = null) { return(new ParamExpression <Double?>(x, sourceColumn).MakeColumn <_Double>()); }