Namespace: DeltaEngine.Tests.Entities
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void GetAllEntitiesWithCertainTag() { new MockEntity().AddTag("test1"); new MockEntity().AddTag("test1"); Assert.AreEqual(0, EntitiesRunner.Current.GetEntitiesWithTag("abc").Count); Assert.AreEqual(2, EntitiesRunner.Current.GetEntitiesWithTag("test1").Count); }
[Test] public void GetAllEntitiesWithHandlersThatHaveATag() { new MockEntity().Start<IncrementCounter>().AddTag("abc"); new MockEntity().Start<IncrementCounter>().AddTag("abc"); Assert.AreEqual(2, EntitiesRunner.Current.GetEntitiesWithTag("abc").Count); }
[Test] public void GetAllEntitiesOfCertainType() { new MockEntity(); new MockEntity(); Assert.AreEqual(2, EntitiesRunner.Current.GetEntitiesOfType<MockEntity>().Count); }
See Also