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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
/// <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>()); }
private static void TestConst(byte?x) { _Byte column = _Byte.Const(x); column.VerifyConst(x); }
private void TestParam(byte?x) { _Byte column = _Byte.Param(x); column.VerifyParam(x); }
private static void TestImplicit(byte?x) { _Byte column = x; column.VerifyParam(x); }