mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-08 03:22:27 +00:00
23 lines
No EOL
639 B
C#
23 lines
No EOL
639 B
C#
using LBPUnion.ProjectLighthouse.Types.Settings;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Xunit;
|
|
|
|
namespace LBPUnion.ProjectLighthouse.Tests
|
|
{
|
|
public sealed class DatabaseFact : FactAttribute
|
|
{
|
|
public DatabaseFact()
|
|
{
|
|
ServerSettings.DbConnectionString = "server=127.0.0.1;uid=root;pwd=lighthouse;database=lighthouse";
|
|
if (!ServerSettings.DbConnected)
|
|
{
|
|
this.Skip = "Database not available";
|
|
}
|
|
else
|
|
{
|
|
using Database database = new();
|
|
database.Database.Migrate();
|
|
}
|
|
}
|
|
}
|
|
} |