PaddleTests ControlPaddleVirtuallyWithGamePad Method Delta Engine Documentation

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

public void ControlPaddleVirtuallyWithGamePad()
Examples

[Test, CloseAfterFirstFrame]
public void ControlPaddleVirtuallyWithGamePad()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage 
    var paddle = Resolve<Paddle>();
    var gamePad = Resolve<MockGamePad>();
    gamePad.SetGamePadState(GamePadButton.Left, State.Pressed);
    AssertPaddleMovesLeftCorrectly(paddle);
    gamePad.SetGamePadState(GamePadButton.Left, State.Released);
    gamePad.SetGamePadState(GamePadButton.Right, State.Pressed);
    AssertPaddleMovesRightCorrectly(paddle);
}
See Also