public void HasSingletonThrowsMultiple() { Assert.IsFalse(EmptySystem.HasSingleton <EcsTestData>()); m_Manager.CreateEntity(typeof(EcsTestData)); Assert.IsTrue(EmptySystem.HasSingleton <EcsTestData>()); m_Manager.CreateEntity(typeof(EcsTestData)); Assert.IsFalse(EmptySystem.HasSingleton <EcsTestData>()); }
public void HasSingleton_ReturnsTrueWithEntityWithOnlyComponent() { Assert.IsFalse(EmptySystem.HasSingleton <EcsTestData>()); m_Manager.CreateEntity(typeof(EcsTestData)); Assert.IsTrue(EmptySystem.HasSingleton <EcsTestData>()); m_Manager.CreateEntity(typeof(EcsTestData)); Assert.IsFalse(EmptySystem.HasSingleton <EcsTestData>()); }
public void HasSingletonWorks_ManagedComponents() { Assert.IsFalse(EmptySystem.HasSingleton <EcsTestManagedComponent>()); m_Manager.CreateEntity(typeof(EcsTestManagedComponent)); Assert.IsTrue(EmptySystem.HasSingleton <EcsTestManagedComponent>()); }