SnakeGameTests ResizeWindow Method Delta Engine Documentation

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

public void ResizeWindow()
Examples

[Test, CloseAfterFirstFrame]
public void ResizeWindow()
{
    var window = Resolve<Window>();
    if (window.GetType() != typeof(MockWindow))
        return; //ncrunch: no coverage (security measure for non-mock, would crash) 
    var mockWindow = (MockWindow)window;
    var game = new Game(mockWindow);
    mockWindow.ViewportPixelSize = new Size(200.0f, 100.0f);
    Assert.AreEqual(0.5f, game.screenSpace.Zoom);
}
See Also