UnitTests/UnitTest.cs

MSTest assembly initializer for unit tests. It creates a Sandbox.TestAppSystem before tests run by calling Init, and shuts it down after tests with Shutdown.

Process Execution
global using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace APLib.UnitTests;

[TestClass]
public class TestInit
{
	private static Sandbox.TestAppSystem s_appSystem;
	
	[AssemblyInitialize]
	public static void AssemblyInitialize( TestContext context )
	{
		s_appSystem = new Sandbox.TestAppSystem();
		s_appSystem.Init();
	}
	
	[AssemblyCleanup]
	public static void AssemblyCleanup()
	{
		s_appSystem.Shutdown();
	}
}