Skip to content

Commit 0f150ff

Browse files
committed
EF6 tests under netcoreapp3.0.
1 parent 3bb9896 commit 0f150ff

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

Provider/src/EntityFramework.Firebird.Tests/EntityFramework.Firebird.Tests.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net452</TargetFramework>
3+
<TargetFrameworks>net452;netcoreapp3.0</TargetFrameworks>
44
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
55
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
66
<SkipSourceLink>true</SkipSourceLink>
@@ -11,6 +11,9 @@
1111
<OutputType>Exe</OutputType>
1212
<StartupObject>FirebirdSql.Data.TestsBase.Program</StartupObject>
1313
</PropertyGroup>
14+
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
15+
<None Remove="app.config" />
16+
</ItemGroup>
1417
<ItemGroup>
1518
<PackageReference Include="NUnit" Version="3.10.1" />
1619
<PackageReference Include="NUnitLite" Version="3.10.1" />

Provider/src/EntityFramework.Firebird.Tests/EntityFrameworkTestsBase.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ namespace EntityFramework.Firebird.Tests
2525
{
2626
public abstract class EntityFrameworkTestsBase : FbTestsBase
2727
{
28+
static EntityFrameworkTestsBase()
29+
{
30+
#if NETCOREAPP3_0
31+
System.Data.Common.DbProviderFactories.RegisterFactory(FbProviderServices.ProviderInvariantName, FirebirdClientFactory.Instance);
32+
#endif
33+
DbConfiguration.SetConfiguration(new FbTestDbContext.Conf());
34+
}
35+
2836
public EntityFrameworkTestsBase()
2937
: base(FbServerType.Default, false, FbWireCrypt.Enabled, false)
3038
{ }

Provider/src/EntityFramework.Firebird.Tests/FbTestDbContext.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ namespace EntityFramework.Firebird.Tests
2222
{
2323
public class FbTestDbContext : DbContext
2424
{
25+
public class Conf : DbConfiguration
26+
{
27+
public Conf()
28+
{
29+
SetProviderServices(FbProviderServices.ProviderInvariantName, FbProviderServices.Instance);
30+
}
31+
}
32+
2533
public FbTestDbContext(FbConnection conn)
2634
: base(conn, false)
2735
{ }

Provider/tests.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ function Tests-EF6() {
108108
cd "$baseDir\src\EntityFramework.Firebird.Tests\bin\$Configuration\net452"
109109
Check-ExitCode { .\EntityFramework.Firebird.Tests.exe --labels=All }
110110

111+
cd "$baseDir\src\EntityFramework.Firebird.Tests\bin\$Configuration\netcoreapp3.0"
112+
Check-ExitCode { dotnet EntityFramework.Firebird.Tests.dll --labels=All }
113+
111114
echo "=== END ==="
112115
}
113116

0 commit comments

Comments
 (0)