mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-08 11:32:28 +00:00
17 lines
No EOL
578 B
C#
17 lines
No EOL
578 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using ProjectLighthouse.Types;
|
|
using ProjectLighthouse.Types.Settings;
|
|
using Xunit;
|
|
|
|
namespace 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) Skip = "Database not available";
|
|
else {
|
|
using Database database = new();
|
|
database.Database.Migrate();
|
|
}
|
|
}
|
|
}
|
|
} |