UnitTests/LibraryTest.cs

A unit test class for library scene management. It creates a Scene, pushes its context, instantiates a GameObject, and asserts the scene directory reports one GameObject.

using Sandbox;

[TestClass]
public partial class LibraryTests
{
	[TestMethod]
	public void SceneTest()
	{
		var scene = new Scene();
		using ( scene.Push() )
		{
			var go = new GameObject();

			Assert.AreEqual( 1, scene.Directory.GameObjectCount );
		}
	}

}