ModernUO/Projects/Server.Tests/Fixtures/ServerFixture.cs
Michael Whelehan 2f5b26ae68
feat(expansions): Adds expansion.json and loads expansions dynamically (#798)
Moves hardcoded expansion settings to the file Data\expansion.json.
2021-09-23 20:28:43 -07:00

35 lines
771 B
C#

using System;
using System.Reflection;
namespace Server.Tests
{
internal class ServerFixture : IDisposable
{
// Global setup
static ServerFixture()
{
Core.Assembly = Assembly.GetExecutingAssembly();
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);
// Load the world
World.Load();
}
public void Dispose()
{
Timer.Init(0);
}
}
}