EntitiesRunnerTests TestExceptions 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 TestExceptions()
Examples

[Test]
public void TestExceptions()
{
    var settings = new MockSettings { UpdatesPerSecond = 0 };
    Assert.Throws<EntitiesRunner.InvalidUpdatePerSecondSettings>(
        () => new EntitiesRunner(new MockBehaviorResolver(), settings));
    Assert.Throws<EntitiesRunner.InvalidUpdatePerSecondSettings>(
        () => EntitiesRunner.Current.ChangeUpdateTimeStep(0));
    Assert.Throws<EntitiesRunner.YouAreNotAllowedToDrawOutsideOfTheDrawLoop>(
        () => EntitiesRunner.Current.CheckIfInDrawState());
    Assert.Throws<EntitiesRunner.UnableToResolveBehavior>(
        () => EntitiesRunner.Current.GetDrawBehavior<DrawBehavior>());
}
See Also