@@ -139,6 +139,34 @@ SELECT CAST(b."DateTimeOffset" AT TIME ZONE 'UTC' AS time)
139139""" ) ;
140140 }
141141
142+ public override async Task DateTime ( )
143+ {
144+ await base . DateTime ( ) ;
145+
146+ AssertSql (
147+ """
148+ SELECT b."Id", b."Bool", b."Byte", b."ByteArray", b."DateOnly", b."DateTime", b."DateTimeOffset", b."Decimal", b."Double", b."Enum", b."FlagsEnum", b."Float", b."Guid", b."Int", b."Long", b."Short", b."String", b."TimeOnly", b."TimeSpan"
149+ FROM "BasicTypesEntities" AS b
150+ WHERE b."DateTimeOffset" AT TIME ZONE 'UTC' = TIMESTAMP '1998-05-04T15:30:10'
151+ """ ) ;
152+ }
153+
154+ // The base test compares DateTimeOffset.UtcDateTime with an Unspecified DateTime, which Npgsql can't generate as a timestamptz literal
155+ public override Task UtcDateTime ( )
156+ => Assert . ThrowsAsync < ArgumentException > ( ( ) => base . UtcDateTime ( ) ) ;
157+
158+ public override async Task LocalDateTime ( )
159+ {
160+ await base . LocalDateTime ( ) ;
161+
162+ AssertSql (
163+ """
164+ SELECT b."Id", b."Bool", b."Byte", b."ByteArray", b."DateOnly", b."DateTime", b."DateTimeOffset", b."Decimal", b."Double", b."Enum", b."FlagsEnum", b."Float", b."Guid", b."Int", b."Long", b."Short", b."String", b."TimeOnly", b."TimeSpan"
165+ FROM "BasicTypesEntities" AS b
166+ WHERE b."DateTimeOffset"::timestamp > TIMESTAMP '1999-01-01T00:00:00'
167+ """ ) ;
168+ }
169+
142170 public override async Task AddYears ( )
143171 {
144172 await base . AddYears ( ) ;
@@ -222,6 +250,15 @@ public override Task ToUnixTimeMilliseconds()
222250 public override Task ToUnixTimeSecond ( )
223251 => AssertTranslationFailed ( ( ) => base . ToUnixTimeSecond ( ) ) ;
224252
253+ public override Task ToOffset ( )
254+ => AssertTranslationFailed ( ( ) => base . ToOffset ( ) ) ;
255+
256+ public override Task Ctor_DateTime ( )
257+ => AssertTranslationFailed ( ( ) => base . Ctor_DateTime ( ) ) ;
258+
259+ public override Task Ctor_DateTime_TimeSpan ( )
260+ => AssertTranslationFailed ( ( ) => base . Ctor_DateTime_TimeSpan ( ) ) ;
261+
225262 public override async Task Milliseconds_parameter_and_constant ( )
226263 {
227264 await base . Milliseconds_parameter_and_constant ( ) ;
0 commit comments