예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #15
0
파일: _Byte.cs 프로젝트: xydoublez/RDO.Net
 /// <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>());
 }
예제 #16
0
        private static void TestConst(byte?x)
        {
            _Byte column = _Byte.Const(x);

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

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

            column.VerifyParam(x);
        }