diff --git a/ClickHouse.Facades.sln b/ClickHouse.Facades.sln
index ddc81ca..2a75823 100644
--- a/ClickHouse.Facades.sln
+++ b/ClickHouse.Facades.sln
@@ -6,6 +6,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClickHouse.Facades.Example"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClickHouse.Facades.Tests", "src\ClickHouse.Facades.Tests\ClickHouse.Facades.Tests.csproj", "{EE903EEE-DD9E-4402-B758-0E2B13363138}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClickHouse.Facades.Testing", "src\ClickHouse.Facades.Testing\ClickHouse.Facades.Testing.csproj", "{677931CB-3677-44A0-A358-0C32ADAC479A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -24,5 +26,9 @@ Global
{EE903EEE-DD9E-4402-B758-0E2B13363138}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE903EEE-DD9E-4402-B758-0E2B13363138}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE903EEE-DD9E-4402-B758-0E2B13363138}.Release|Any CPU.Build.0 = Release|Any CPU
+ {677931CB-3677-44A0-A358-0C32ADAC479A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {677931CB-3677-44A0-A358-0C32ADAC479A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {677931CB-3677-44A0-A358-0C32ADAC479A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {677931CB-3677-44A0-A358-0C32ADAC479A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
diff --git a/src/ClickHouse.Facades.Testing/ClickHouse.Facades.Testing.csproj b/src/ClickHouse.Facades.Testing/ClickHouse.Facades.Testing.csproj
new file mode 100644
index 0000000..2936d26
--- /dev/null
+++ b/src/ClickHouse.Facades.Testing/ClickHouse.Facades.Testing.csproj
@@ -0,0 +1,18 @@
+
+
+
+ netstandard2.1
+ enable
+ enable
+ default
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ClickHouse.Facades.Testing/ClickHouseConnectionBrokerStub.cs b/src/ClickHouse.Facades.Testing/ClickHouseConnectionBrokerStub.cs
new file mode 100644
index 0000000..24bc649
--- /dev/null
+++ b/src/ClickHouse.Facades.Testing/ClickHouseConnectionBrokerStub.cs
@@ -0,0 +1,90 @@
+using System.Data;
+using System.Data.Common;
+using ClickHouse.Client.ADO;
+using ClickHouse.Client.Copy;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace ClickHouse.Facades.Testing;
+
+internal class ClickHouseConnectionBrokerStub : ClickHouseConnectionBroker
+ where TContext : ClickHouseContext
+{
+ private readonly ClickHouseConnectionTracker _tracker;
+ private readonly ClickHouseConnectionResponseProducer _responseProducer;
+
+ public ClickHouseConnectionBrokerStub(
+ IServiceProvider serviceProvider,
+ ClickHouseConnection connection) : base(connection)
+ {
+ _tracker = serviceProvider.GetRequiredService>();
+ _responseProducer = serviceProvider.GetRequiredService>();
+ }
+
+ internal override string? ServerVersion => _responseProducer.ServerVersion;
+
+ internal override string? ServerTimezone => _responseProducer.ServerTimezone;
+
+ internal override ClickHouseCommand CreateCommand()
+ {
+ throw new NotImplementedException();
+ }
+
+ internal override Task ExecuteNonQueryAsync(string statement, CancellationToken cancellationToken)
+ {
+ var result = _responseProducer.TryGetResponse(TestQueryType.ExecuteNonQuery, statement, out var response)
+ ? (int) response!
+ : 0;
+
+ _tracker.Add(new ClickHouseTestResponse(TestQueryType.ExecuteNonQuery, statement, result));
+
+ return Task.FromResult(result);
+ }
+
+ internal override Task