GameTests HoldingCursorLeftEventuallyMovesBlockLeftTwice 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 HoldingCursorLeftEventuallyMovesBlockLeftTwice()
Examples

[Test, CloseAfterFirstFrame]
public void HoldingCursorLeftEventuallyMovesBlockLeftTwice()
{
    game.StartGame();
    InitializeBlocks(game.Controller, content);
    mockKeyboard.SetKeyboardState(Key.CursorLeft, State.Pressing);
    AdvanceTimeAndUpdateEntities(0.01f);
    if (IsMockResolver)
    //ncrunch: no coverage start 
        return; 
    Assert.AreEqual(4, game.Controller.FallingBlock.Left);
    AdvanceTimeAndUpdateEntities(0.02f);
    Assert.AreEqual(3, game.Controller.FallingBlock.Left);
    //ncrunch: no coverage end
}
See Also