Skip to content

Commit bc64e84

Browse files
Copilotdroyad
andcommitted
Update Npgsql to 10.0.1 for net8.0 target and add TestConnectionManager
Co-authored-by: droyad <1687639+droyad@users.noreply.github.com>
1 parent da34188 commit bc64e84

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

src/Tests/TestConnectionManager.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections.Generic;
2+
using System.Data;
3+
using DbUp.Engine.Transactions;
4+
5+
namespace DbUp.Postgresql.Tests;
6+
7+
/// <summary>
8+
/// Test implementation of DatabaseConnectionManager for unit testing.
9+
/// </summary>
10+
public class TestConnectionManager : DatabaseConnectionManager
11+
{
12+
public TestConnectionManager(IDbConnection connection)
13+
: base(new DelegateConnectionFactory(_ => connection))
14+
{
15+
}
16+
17+
public override IEnumerable<string> SplitScriptIntoCommands(string scriptContents)
18+
{
19+
yield return scriptContents;
20+
}
21+
}

src/Tests/Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<ItemGroup>
1212
<ProjectReference Include="..\dbup-postgresql\dbup-postgresql.csproj"/>
13-
<PackageReference Include="DbUp.Tests.Common" Version="6.0.15" />
13+
<PackageReference Include="DbUp.Tests.Common" Version="5.0.37" />
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
1515
<PackageReference Include="xunit" Version="2.9.3" />
1616
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">

src/dbup-postgresql/dbup-postgresql.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</ItemGroup>
3333

3434
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
35-
<PackageReference Include="Npgsql" Version="9.0.4" />
35+
<PackageReference Include="Npgsql" Version="10.0.1" />
3636
</ItemGroup>
3737

3838
<ItemGroup>

0 commit comments

Comments
 (0)