-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30dbe17
commit 26e9ebc
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
test/EntityFrameworkPostgreSqlIntegrationTests/Issue188Tests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using EntityFrameworkIntegrationTests.cs; | ||
using Microsoft.EntityFrameworkCore; | ||
using Xunit; | ||
|
||
namespace Gridify.Tests; | ||
|
||
public class Issue188Tests | ||
{ | ||
|
||
private readonly MyDbContext _dbContext = new(); | ||
|
||
[Fact] | ||
public void DateTimeFilteringWithUTCKind_UsingGridifyMapper_ShouldNotThrowException() | ||
{ | ||
var mapper = new GridifyMapper<User>(q => q.DefaultDateTimeKind = DateTimeKind.Utc) | ||
.GenerateMappings(); | ||
_dbContext.Users.ApplyFiltering("CreateDate>2023-11-14", mapper).ToQueryString(); | ||
} | ||
|
||
[Fact] | ||
public void DateTimeFilteringWithUTCKind_UsingGlobalConfiguration_ShouldNotThrowException() | ||
{ | ||
GridifyGlobalConfiguration.DefaultDateTimeKind = DateTimeKind.Utc; | ||
_dbContext.Users.ApplyFiltering("CreateDate>2023-11-14").ToQueryString(); | ||
GridifyGlobalConfiguration.DefaultDateTimeKind = null; | ||
} | ||
|
||
} | ||
|
||
|