Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
0
        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);
        }
Exemplo n.º 11
0
        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);
        }
Exemplo n.º 12
0
        private void TestConst(Double?x)
        {
            _Double column = _Double.Const(x);

            column.VerifyConst(x);
        }
Exemplo n.º 13
0
        private void TestImplicit(Double?x)
        {
            _Double column = x;

            column.VerifyParam(x);
        }
Exemplo n.º 14
0
 /// <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>());
 }