public void WhenImportPrefabsIsNull_ShouldLogWarning()
 {
     wm = new MyWorldCreator(new MyWorldOptions {
         GhostCollectionPrefab = null
     });
     wm.ImportPrefabs();
     LogAssert.Expect(LogType.Warning, new Regex(".*"));
 }
Beispiel #2
0
        public void WhenOptionNotSpecified_ShouldNotCreateWorldFromConstructor()
        {
            worldOptions.CreateWorldOnInstantiate = false;
            MyWorldCreator worldManager = new MyWorldCreator(worldOptions);

            current = new MyWorldBaseImpl(worldOptions, worldManager);
            Assert.IsFalse(worldManager.CalledBootStrapCreateWorld);
        }
Beispiel #3
0
        public void ShouldHaveCorrectSystems()
        {
            MyWorldCreator wm = new MyWorldCreator(worldOptions);

            current = new MyWorldBaseImpl(worldOptions, wm);
            wm.CreateWorld();
            Assert.IsNotNull(current.World.GetExistingSystem <EventComponentSystem>());
        }
Beispiel #4
0
        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());
        }
 public void SetUp()
 {
     options = MyWorldOptions.Defaults;
     wm      = new MyWorldCreator(options);
 }