EntitiesRunnerTests AddEntityAndAttachHandlerLater Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Entities
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void AddEntityAndAttachHandlerLater()
Examples

[Test]
public void AddEntityAndAttachHandlerLater()
{
    var entity = new MockEntity().Add(0);
    entities.RunEntities();
    Assert.AreEqual(0, entity.Get<int>());
    entity.Start<IncrementCounter>();
    entities.RunEntities();
    Assert.AreEqual(1, entity.Get<int>());
    entity.Stop<IncrementCounter>();
    entities.RunEntities();
    Assert.AreEqual(1, entity.Get<int>());
}
See Also