modernuo/Projects/Server.Tests/Fixtures/ServerFixture.cs
Kamron Batman 19f65dcabe
fix: Fixes edge cases with on off items (#1832)
### Summary
- Generalizes the On/Off toggle items concept
- Updates the OnOffGump so it is static
- Standardizes OnOff items so they can be used by staff


### Notes
Decided to not fix #1417 because it is not clear that the clilocs or errors are for that purpose. Can't test this on OSI anyways.
2024-06-10 18:11:35 -07:00

41 lines
939 B
C#

using System;
using System.Reflection;
namespace Server.Tests;
internal class ServerFixture : IDisposable
{
// Global setup
static ServerFixture()
{
Core.ApplicationAssembly = Assembly.GetExecutingAssembly(); // Server.Tests.dll
// Load Configurations
ServerConfiguration.Load(true);
// Load an empty assembly list into the resolver
ServerConfiguration.AssemblyDirectories.Add(Core.BaseDirectory);
AssemblyHandler.LoadAssemblies(["Server.dll"]);
Core.LoopContext = new EventLoopContext();
Core.Expansion = Expansion.EJ;
// Configure / Initialize
TestMapDefinitions.ConfigureTestMapDefinitions();
// Configure the world
World.Configure();
Timer.Init(0);
// Load the world
World.Load();
World.ExitSerializationThreads();
}
public void Dispose()
{
Timer.Init(0);
}
}