-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
34 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
knightbus-sqlserver/tests/KnightBus.SqlServer.Tests.Integration/DatabaseInitializer.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
knightbus-sqlserver/tests/KnightBus.SqlServer.Tests.Integration/SqlServerSetup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System.Threading.Tasks; | ||
using Microsoft.Data.SqlClient; | ||
using NUnit.Framework; | ||
using Testcontainers.MsSql; | ||
|
||
namespace KnightBus.SqlServer.Tests.Integration; | ||
|
||
[SetUpFixture] | ||
public class SqlServerSetup | ||
{ | ||
private const string DatabaseName = "KnightBus"; | ||
|
||
private static readonly MsSqlContainer MsSql = new MsSqlBuilder() | ||
.WithImage("mcr.microsoft.com/mssql/server:2019-latest") | ||
.WithPortBinding(14333, 1433) | ||
.Build(); | ||
|
||
public static string ConnectionString; | ||
|
||
[OneTimeSetUp] | ||
public async Task OneTimeSetup() | ||
{ | ||
await MsSql.StartAsync(); | ||
ConnectionString = MsSql.GetConnectionString(); | ||
} | ||
|
||
[OneTimeTearDown] | ||
public async Task Teardown() | ||
{ | ||
await MsSql.DisposeAsync(); | ||
} | ||
} |