diff --git a/test/EFCore.PG.NodaTime.FunctionalTests/BuiltInDataTypesWithNodaTimePluginEnabledTest.cs b/test/EFCore.PG.NodaTime.FunctionalTests/BuiltInDataTypesWithNodaTimePluginEnabledTest.cs new file mode 100644 index 000000000..2d8cd53fc --- /dev/null +++ b/test/EFCore.PG.NodaTime.FunctionalTests/BuiltInDataTypesWithNodaTimePluginEnabledTest.cs @@ -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 + { + 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; + } + } + } +}