public void WhenOptionNotSpecified_ShouldNotCreateWorldFromConstructor() { worldOptions.CreateWorldOnInstantiate = false; MyWorldCreator worldManager = new MyWorldCreator(worldOptions); current = new MyWorldBaseImpl(worldOptions, worldManager); Assert.IsFalse(worldManager.CalledBootStrapCreateWorld); }
public void ShouldHaveCorrectSystems() { MyWorldCreator wm = new MyWorldCreator(worldOptions); current = new MyWorldBaseImpl(worldOptions, wm); wm.CreateWorld(); Assert.IsNotNull(current.World.GetExistingSystem <EventComponentSystem>()); }
public void DestroyWorld_ShouldCreateSingleton() { worldOptions.CreateWorldOnInstantiate = true; MyWorldCreator worldManager = new MyWorldCreator(worldOptions); current = new MyWorldBaseImpl(worldOptions, worldManager); current.DestroyWorld(); Assert.AreEqual(1, current.World.EntityManager.CreateEntityQuery(typeof(DestroyWorld)).CalculateEntityCount()); }