Beispiel #1
0
        private void TestFromBoolean(_Boolean x, Byte?expectedValue)
        {
            _Byte expr   = (_Byte)x;
            var   dbExpr = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(x, typeof(bool?), typeof(Byte?));
            expr.VerifyEval(expectedValue);
        }
Beispiel #2
0
        private void TestFromDecimal(Decimal?x, Byte?expectedValue)
        {
            _Decimal column1 = x;
            _Byte    expr    = (_Byte)column1;
            var      dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(Decimal?), typeof(Byte?));
            expr.VerifyEval(expectedValue);
        }
Beispiel #3
0
        private void TestFromByte(Byte?x, WeekDay?expectedValue)
        {
            _Byte column1 = x;
            var   expr    = (_ByteEnum <WeekDay>)column1;
            var   dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(Byte?), typeof(WeekDay?));
            expr.VerifyEval(expectedValue);
        }
Beispiel #4
0
        private void TestFromByte(byte?x, Int32?expectedValue)
        {
            _Byte  column1 = x;
            _Int32 expr    = column1;
            var    dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(byte?), typeof(Int32?));
            expr.VerifyEval(expectedValue);
        }
Beispiel #5
0
        private void TestCastToString(byte?x, String expectedValue)
        {
            _Byte   column1 = x;
            _String expr    = column1.CastToString();
            var     dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(byte?), typeof(String));
            expr.VerifyEval(expectedValue);
        }
Beispiel #6
0
        private void TestFromByte(byte?x, Double?expectedValue)
        {
            _Byte   column1 = x;
            _Double expr    = (_Double)column1;
            var     dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(byte?), typeof(Double?));
            expr.VerifyEval(expectedValue);
        }
Beispiel #7
0
        private void TestOnesComplement(Byte?x, Byte?expectedValue)
        {
            _Byte column = x;
            var   expr   = ~column;
            var   dbExpr = (DbUnaryExpression)expr.DbExpression;

            dbExpr.Verify(DbUnaryExpressionKind.OnesComplement, column);
            expr.VerifyEval(expectedValue);
        }
Beispiel #8
0
        private void TestFromInt64(Int64?x, Byte?expectedValue)
        {
            _Int64 column1 = x;
            _Byte  expr    = (_Byte)column1;
            var    dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(Int64?), typeof(Byte?));
            expr.VerifyEval(expectedValue);
        }
Beispiel #9
0
        private void TestFromString(String x, Byte?expectedValue)
        {
            _String column1 = x;
            _Byte   expr    = (_Byte)column1;
            var     dbExpr  = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(String), typeof(Byte?));
            expr.VerifyEval(expectedValue);
        }
Beispiel #10
0
        private void TestSubstract(Byte?x, Byte?y, Byte?expectedValue)
        {
            _Byte column1 = x;
            _Byte column2 = y;
            var   expr    = column1 - column2;
            var   dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.Substract, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Beispiel #11
0
        private void TestModulo(Byte?x, Byte?y, Byte?expectedValue)
        {
            _Byte column1 = x;
            _Byte column2 = y;
            var   expr    = column1 % column2;
            var   dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.Modulo, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Beispiel #12
0
        private void TestNotEqual(Byte?x, Byte?y, bool?expectedValue)
        {
            _Byte column1 = x;
            _Byte column2 = y;
            var   expr    = column1 != column2;
            var   dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.NotEqual, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Beispiel #13
0
        private void TestGreaterThan(Byte?x, Byte?y, bool?expectedValue)
        {
            _Byte column1 = x;
            _Byte column2 = y;
            var   expr    = column1 > column2;
            var   dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.GreaterThan, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Beispiel #14
0
        private void TestBitwiseXor(Byte?x, Byte?y, Byte?expectedValue)
        {
            _Byte column1 = x;
            _Byte column2 = y;
            var   expr    = column1 ^ column2;
            var   dbExpr  = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.BitwiseXor, column1, column2);
            expr.VerifyEval(expectedValue);
        }
Beispiel #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 _Byte Param(byte?x, _Byte sourceColumn = null)
 {
     return(new ParamExpression <byte?>(x, sourceColumn).MakeColumn <_Byte>());
 }
Beispiel #16
0
        private static void TestConst(byte?x)
        {
            _Byte column = _Byte.Const(x);

            column.VerifyConst(x);
        }
Beispiel #17
0
        private void TestParam(byte?x)
        {
            _Byte column = _Byte.Param(x);

            column.VerifyParam(x);
        }
Beispiel #18
0
        private static void TestImplicit(byte?x)
        {
            _Byte column = x;

            column.VerifyParam(x);
        }