fix: Fixes tests that require races to be loaded (#745)

This commit is contained in:
Kamron Batman 2021-08-29 00:48:11 -07:00 • committed by GitHub
parent 8ffd5a5bd0
commit 251acec102
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 1 deletions

View file

@ -2,7 +2,7 @@ using System;
namespace Server.Tests
{
public class ServerFixture : IDisposable
internal class ServerFixture : IDisposable
{
// Global setup
static ServerFixture()

View file

@ -0,0 +1,38 @@
using System;
using Server.Misc;
namespace Server.Tests
{
internal class ServerFixture : IDisposable
{
// Global setup
static ServerFixture()
{
Core.LoopContext = new EventLoopContext();
Core.Expansion = Expansion.EJ;
// Load Configurations
ServerConfiguration.Load(true);
// Configure / Initialize
TestMapDefinitions.ConfigureTestMapDefinitions();
// Configure the world
World.Configure();
Timer.Init(0);
// Configure Races
RaceDefinitions.Configure();
// Load the world
World.Load();
}
public void Dispose()
{
Timer.Init(0);
}
}
}