forked from npgsql/efcore.pg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run BuiltInDataTypesNpgsqlTest again with the NodaTime plugin activat…
…ed to verify that all BCL date/time types are properly supported. Closes npgsql#1490
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
test/EFCore.PG.NodaTime.FunctionalTests/BuiltInDataTypesWithNodaTimePluginEnabledTest.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,29 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Npgsql.EntityFrameworkCore.PostgreSQL | ||
{ | ||
public class BuiltInDataTypesWithNodaTimePluginEnabledTest : BuiltInDataTypesNpgsqlTest, IClassFixture<BuiltInDataTypesWithNodaTimePluginEnabledTest.BuiltInDataTypesWithNodaTimePluginEnabledFixture> | ||
{ | ||
public BuiltInDataTypesWithNodaTimePluginEnabledTest(BuiltInDataTypesWithNodaTimePluginEnabledFixture fixture, ITestOutputHelper testOutputHelper) | ||
: base(fixture, testOutputHelper) | ||
{ } | ||
|
||
public class BuiltInDataTypesWithNodaTimePluginEnabledFixture : BuiltInDataTypesNpgsqlFixture | ||
{ | ||
protected override IServiceCollection AddServices(IServiceCollection serviceCollection) | ||
=> base.AddServices(serviceCollection).AddEntityFrameworkNpgsqlNodaTime(); | ||
|
||
public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) | ||
{ | ||
var optionsBuilder = base.AddOptions(builder); | ||
new NpgsqlDbContextOptionsBuilder(optionsBuilder).UseNodaTime(); | ||
|
||
return optionsBuilder; | ||
} | ||
} | ||
} | ||
} |