2025-07-13 18:13:04 +01:00
|
|
|
using isnd.tests;
|
2018-09-04 16:40:02 +02:00
|
|
|
using Xunit.Abstractions;
|
|
|
|
|
|
2021-06-06 20:32:39 +01:00
|
|
|
namespace yavscTests.Mandatory
|
2018-09-04 16:40:02 +02:00
|
|
|
{
|
2025-07-14 18:58:04 +01:00
|
|
|
|
2019-01-05 02:51:04 +00:00
|
|
|
[Collection("Database")]
|
2021-04-05 00:11:54 +01:00
|
|
|
[Trait("regression", "II")]
|
2018-09-04 16:40:02 +02:00
|
|
|
[Trait("dev", "wip")]
|
2025-07-13 18:13:04 +01:00
|
|
|
public class Database: IClassFixture<WebServerFixture>, IDisposable
|
2018-09-04 16:40:02 +02:00
|
|
|
{
|
2025-07-13 18:13:04 +01:00
|
|
|
readonly WebServerFixture _serverFixture;
|
2020-09-12 01:11:30 +01:00
|
|
|
readonly ITestOutputHelper output;
|
2025-07-13 18:13:04 +01:00
|
|
|
public Database(WebServerFixture serverFixture, ITestOutputHelper output)
|
2018-09-04 16:40:02 +02:00
|
|
|
{
|
|
|
|
|
this.output = output;
|
|
|
|
|
_serverFixture = serverFixture;
|
2025-07-14 18:58:04 +01:00
|
|
|
|
2018-09-04 16:40:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Assuming we're using an account that may create databases,
|
|
|
|
|
/// Install all our migrations in a fresh new database.
|
|
|
|
|
/// </summary>
|
2019-05-24 20:14:38 +01:00
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
2021-06-06 22:38:04 +01:00
|
|
|
if (_serverFixture!=null)
|
|
|
|
|
{
|
|
|
|
|
_serverFixture.Dispose();
|
|
|
|
|
}
|
2019-05-24 20:14:38 +01:00
|
|
|
|
|
|
|
|
}
|
2018-09-04 16:40:02 +02:00
|
|
|
}
|
2019-01-05 02:51:04 +00:00
|
|
|
}
|