fix: Fixes tests that require races to be loaded (#745)
This commit is contained in:
parent
8ffd5a5bd0
commit
251acec102
2 changed files with 39 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ using System;
|
|||
|
||||
namespace Server.Tests
|
||||
{
|
||||
public class ServerFixture : IDisposable
|
||||
internal class ServerFixture : IDisposable
|
||||
{
|
||||
// Global setup
|
||||
static ServerFixture()
|
||||
|
|
|
|||
38
Projects/UOContent.Tests/Fixtures/ServerFixture.cs
Normal file
38
Projects/UOContent.Tests/Fixtures/ServerFixture.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue