diff --git a/readme.md b/readme.md
index dd720c3..f4b34ab 100644
--- a/readme.md
+++ b/readme.md
@@ -50,7 +50,7 @@ This test:
```cs
await Verify(connection);
```
-snippet source | anchor
+snippet source | anchor
Will result in the following verified file:
@@ -69,7 +69,7 @@ await Verify(connection)
// include only tables and views
.SchemaIncludes(DbObjects.Tables | DbObjects.Views);
```
-snippet source | anchor
+snippet source | anchor
Available values:
@@ -107,7 +107,7 @@ await Verify(connection)
_ => _ is TableViewBase ||
_.Name == "MyTrigger");
```
-snippet source | anchor
+snippet source | anchor
@@ -129,7 +129,7 @@ command.CommandText = "select Value from MyTable";
var value = await command.ExecuteScalarAsync();
await Verify(value!);
```
-snippet source | anchor
+snippet source | anchor
Will result in the following verified file:
@@ -184,7 +184,7 @@ await Verify(
sqlEntries = entries
});
```
-snippet source | anchor
+snippet source | anchor
@@ -212,7 +212,7 @@ var sqlErrorsViaType = entries
.Select(_ => _.Data)
.OfType();
```
-snippet source | anchor
+snippet source | anchor
diff --git a/src/Tests/Tests.cs b/src/Tests/Tests.cs
index c5afaff..01c04b6 100644
--- a/src/Tests/Tests.cs
+++ b/src/Tests/Tests.cs
@@ -8,7 +8,11 @@ static Tests() =>
"VerifySqlServer",
connection =>
{
- var server = new Server(new ServerConnection(connection));
+ var serverConnection = new ServerConnection
+ {
+ ConnectionString = connection.ConnectionString,
+ };
+ var server = new Server(serverConnection);
server.ConnectionContext.ExecuteNonQuery(
"""
CREATE TABLE
diff --git a/src/Verify.SqlServer/SchemaValidation/SqlScriptBuilder.cs b/src/Verify.SqlServer/SchemaValidation/SqlScriptBuilder.cs
index 9cef975..629ebd4 100644
--- a/src/Verify.SqlServer/SchemaValidation/SqlScriptBuilder.cs
+++ b/src/Verify.SqlServer/SchemaValidation/SqlScriptBuilder.cs
@@ -31,7 +31,11 @@ static SqlScriptBuilder()
public string BuildContent(SqlConnection connection)
{
var builder = new SqlConnectionStringBuilder(connection.ConnectionString);
- var server = new Server(new ServerConnection(connection));
+ var serverConnection = new ServerConnection
+ {
+ ConnectionString = connection.ConnectionString,
+ };
+ var server = new Server(serverConnection);
return BuildContent(server, builder);
}