Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/Tests/TestConnectionManager.cs
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Why did you add this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Is this needed?

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.Data;
using DbUp.Engine.Transactions;

namespace DbUp.Postgresql.Tests;

/// <summary>
/// Test implementation of DatabaseConnectionManager for unit testing.
/// </summary>
public class TestConnectionManager : DatabaseConnectionManager
{
public TestConnectionManager(IDbConnection connection)
: base(new DelegateConnectionFactory(_ => connection))
{
}

public override IEnumerable<string> SplitScriptIntoCommands(string scriptContents)
{
yield return scriptContents;
}
}
4 changes: 2 additions & 2 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<ItemGroup>
<ProjectReference Include="..\dbup-postgresql\dbup-postgresql.csproj"/>
<PackageReference Include="DbUp.Tests.Common" Version="6.0.15" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="DbUp.Tests.Common" Version="5.0.37" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion src/dbup-postgresql/dbup-postgresql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Npgsql" Version="9.0.4" />
<PackageReference Include="Npgsql" Version="10.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading