ControllerTests RunScoresPointsOverTime Method Delta Engine Documentation

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

public void RunScoresPointsOverTime()
Examples

[Test, CloseAfterFirstFrame, Category("Slow")]
public void RunScoresPointsOverTime()
{
    int score = 0;
    controller.AddToScore += points => score += points;
    controller.FallingBlock = new Block(displayMode, content, Vector2D.One);
    controller.UpcomingBlock = new Block(displayMode, content, Vector2D.One);
    AdvanceTimeAndUpdateEntities(12.0f);
    Assert.AreEqual(1, score);
    AdvanceTimeAndUpdateEntities(12.0f);
    Assert.GreaterOrEqual(score, 2);
}
See Also