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 StartAndStopBehavior() { entityWithTags.Start<MockUpdateBehavior>(); Assert.IsTrue(entityWithTags.ContainsBehavior<MockUpdateBehavior>()); Assert.AreEqual(1, entities.GetEntitiesOfType<MockEntity>().Count); entityWithTags.Stop<MockUpdateBehavior>(); Assert.IsFalse(entityWithTags.ContainsBehavior<MockUpdateBehavior>()); Assert.AreEqual(1, entities.GetEntitiesOfType<MockEntity>().Count); entityWithTags.Stop<MockUpdateBehavior>(); }
[Test] public void StartAndStopBehaviorDuringUpdate() { entityWithTags.Start<CreateEntityStartAndStopBehavior>(); entities.RunEntities(); Assert.IsFalse(entityWithTags.Get<Entity>().ContainsBehavior<MockUpdateBehavior>()); }
See Also