public void BaseSetup() { TestFixtureAttribute a = Attribute.GetCustomAttribute(GetType(), typeof(TestFixtureAttribute)) as TestFixtureAttribute; if (NeedsResourcePack && Headless) { // Disable the test automatically. a.Explicit = true; return; } // Clear state across tests. IoCManager.Clear(); RegisterIoC(); var Assemblies = new List <Assembly>(4); string AssemblyDir = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); switch (Project) { case UnitTestProject.Client: Assemblies.Add(Assembly.LoadFrom(Path.Combine(AssemblyDir, "SS14.Client.exe"))); break; case UnitTestProject.Server: Assemblies.Add(Assembly.LoadFrom(Path.Combine(AssemblyDir, "SS14.Server.exe"))); break; default: throw new NotSupportedException($"Unknown testing project: {Project}"); } Assemblies.Add(Assembly.LoadFrom(Path.Combine(AssemblyDir, "SS14.Shared.dll"))); Assemblies.Add(Assembly.GetExecutingAssembly()); IoCManager.Resolve <IReflectionManager>().LoadAssemblies(Assemblies); if (NeedsClientConfig) { //ConfigurationManager setup GetConfigurationManager = IoCManager.Resolve <IConfigurationManager>(); GetConfigurationManager.LoadFromFile(PathHelpers.ExecutableRelativeFile("./client_config.toml")); } if (NeedsResourcePack) { GetResourceCache = IoCManager.Resolve <IResourceCache>(); InitializeResources(); } }