File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/Tests/Tests/CommonOptions/DateMath Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,17 @@ public void ImplicitConversionFromNullNullableDateTime()
2222 dateMath . Should ( ) . BeNull ( ) ;
2323 }
2424
25+ [ U ] // F# backticks would be great in C# :)
26+ public void ImplicitConversionFromDefaultDateTimeIsNotNullButEmptyString ( )
27+ {
28+ // in 6.x DateMath is backed by a DateTime instance
29+ // for 7.x we will adress this
30+ DateTime nullableDateTime = default ;
31+ Nest . DateMath dateMath = nullableDateTime ;
32+ dateMath . Should ( ) . NotBeNull ( ) ;
33+ dateMath . ToString ( ) . Should ( ) . BeEmpty ( ) ;
34+ }
35+
2536 [ U ]
2637 public void ImplicitConversionFromDateMathString ( )
2738 {
@@ -38,4 +49,5 @@ public void ImplicitConversionFromNullableDateTimeWithValue()
3849 dateMath . Should ( ) . NotBeNull ( ) ;
3950 }
4051 }
52+
4153}
You can’t perform that action at this time.
0 commit comments