mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-02-07 13:11:07 -05:00
- Added Sandbox.Test.Unit project (contains independent tests that can run in parallel) - Modify some slow/stress tests (e.g. instead of doing a million iterations settle for 10k). Tests run almost twice as fast now.
28 lines
612 B
C#
28 lines
612 B
C#
global using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
global using Sandbox;
|
|
global using System.Linq;
|
|
global using System.Threading.Tasks;
|
|
global using Assert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;
|
|
using Sandbox.Engine;
|
|
using Sandbox.Internal;
|
|
using System;
|
|
|
|
[TestClass]
|
|
public class TestInit
|
|
{
|
|
public static Sandbox.AppSystem TestAppSystem;
|
|
|
|
[AssemblyInitialize]
|
|
public static void AssemblyInitialize( TestContext context )
|
|
{
|
|
TestAppSystem = new TestAppSystem();
|
|
TestAppSystem.Init();
|
|
}
|
|
|
|
[AssemblyCleanup]
|
|
public static void AssemblyCleanup()
|
|
{
|
|
TestAppSystem.Shutdown();
|
|
}
|
|
}
|