Exemplo n.º 1
0
        private void TestFromBoolean(_Boolean x, Single?expectedValue)
        {
            _Single expr   = (_Single)x;
            var     dbExpr = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(x, typeof(bool?), typeof(Single?));
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 2
0
        private void TestFromSingle(Single?x, Int32?expectedValue)
        {
            _Single column1 = x;
            _Int32  expr    = (_Int32)column1;
            var     dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(Single?), typeof(Int32?));
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 3
0
        private void TestFromSingle(Single?x, Double?expectedValue)
        {
            _Single column1 = x;
            _Double expr    = (_Double)column1;
            var     dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(Single?), typeof(Double?));
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 4
0
        private void TestNegate(Single?x, Single?expectedValue)
        {
            _Single column = x;
            var     expr   = -column;
            var     dbExpr = (DbUnaryExpression)expr.DbExpression;

            dbExpr.Verify(DbUnaryExpressionKind.Negate, column);
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 5
0
        private void TestCastToString(Single?x, String expectedValue)
        {
            _Single column1 = x;
            _String expr    = (_String)column1;
            var     dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(Single?), typeof(String));
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 6
0
        private void TestFromString(String x, Single?expectedValue)
        {
            _String column1 = x;
            _Single expr    = (_Single)column1;
            var     dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(String), typeof(Single?));
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 7
0
        private void TestFromDecimal(Decimal?x, Single?expectedValue)
        {
            _Decimal column1 = x;
            _Single  expr    = (_Single)column1;
            var      dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(Decimal?), typeof(Single?));
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 8
0
        private void TestFromInt32(Int32?x, Single?expectedValue)
        {
            _Int32  column1 = x;
            _Single expr    = (_Single)column1;
            var     dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(Int32?), typeof(Single?));
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 9
0
        private void TestSubstract(Single?x, Single?y, Single?expectedValue)
        {
            _Single column1 = x;
            _Single column2 = y;
            var     expr    = column1 - column2;
            var     dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.Substract, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 10
0
        private void TestNotEqual(Single?x, Single?y, bool?expectedValue)
        {
            _Single column1 = x;
            _Single column2 = y;
            var     expr    = column1 != column2;
            var     dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.NotEqual, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 11
0
        private void TestGreaterThan(Single?x, Single?y, bool?expectedValue)
        {
            _Single column1 = x;
            _Single column2 = y;
            var     expr    = column1 > column2;
            var     dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.GreaterThan, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 12
0
        private void TestMultiply(Single?x, Single?y, Single?expectedValue)
        {
            _Single column1 = x;
            _Single column2 = y;
            var     expr    = column1 * column2;
            var     dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.Multiply, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Exemplo n.º 13
0
        private void TestConst(Single?x)
        {
            _Single column = _Single.Const(x);

            column.VerifyConst(x);
        }
Exemplo n.º 14
0
        private void TestImplicit(Single?x)
        {
            _Single column = x;

            column.VerifyParam(x);
        }
Exemplo n.º 15
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 _Single Param(Single?x, _Single sourceColumn = null)
 {
     return(new ParamExpression <Single?>(x, sourceColumn).MakeColumn <_Single>());
 }