Пример #1
0
 private void TestFromString(String x, TimeSpan? expectedValue)
 {
     _String column1 = x;
     _TimeSpan expr = (_TimeSpan)column1;
     var dbExpr = (DbCastExpression)expr.DbExpression;
     dbExpr.Verify(column1, typeof(String), typeof(TimeSpan?));
     expr.VerifyEval(expectedValue);
 }
Пример #2
0
 private void TestCastToString(TimeSpan? x, String expectedValue)
 {
     _TimeSpan column1 = x;
     _String expr = (_String)column1;
     var dbExpr = (DbCastExpression)expr.DbExpression;
     dbExpr.Verify(column1, typeof(TimeSpan?), typeof(String));
     expr.VerifyEval(expectedValue);
 }
Пример #3
0
 private void TestLessThan(TimeSpan? x, TimeSpan? y, bool? expectedValue)
 {
     _TimeSpan column1 = x;
     _TimeSpan column2 = y;
     var expr = column1 < column2;
     var dbExpr = (DbBinaryExpression)expr.DbExpression;
     dbExpr.Verify(BinaryExpressionKind.LessThan, column1, column2);
     expr.VerifyEval(expectedValue);
 }
Пример #4
0
 private void TestGreaterThanOrEqual(TimeSpan? x, TimeSpan? y, bool? expectedValue)
 {
     _TimeSpan column1 = x;
     _TimeSpan column2 = y;
     var expr = column1 >= column2;
     var dbExpr = (DbBinaryExpression)expr.DbExpression;
     dbExpr.Verify(BinaryExpressionKind.GreaterThanOrEqual, column1, column2);
     expr.VerifyEval(expectedValue);
 }
Пример #5
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 _TimeSpan Param(TimeSpan?x, _TimeSpan sourceColumn = null)
 {
     return(new ParamExpression <TimeSpan?>(x, sourceColumn).MakeColumn <_TimeSpan>());
 }
Пример #6
0
 private void TestConst(TimeSpan? x)
 {
     _TimeSpan column = _TimeSpan.Const(x);
     column.VerifyConst(x);
 }
Пример #7
0
 private void TestImplicit(TimeSpan? x)
 {
     _TimeSpan column = x;
     column.VerifyParam(x);
 }