MouseZoomTriggerTests MouseWheelZoomUsingCommandName Method Delta Engine Documentation

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

public void MouseWheelZoomUsingCommandName()
Examples

[Test, CloseAfterFirstFrame]
public void MouseWheelZoomUsingCommandName()
{
    var mouse = Resolve<Mouse>() as MockMouse;
    if (mouse == null)
        return; //ncrunch: no coverage 
    bool isZoomed = false;
    new Command(Command.Zoom, (float zoomAmount) => isZoomed = true);
    mouse.ScrollUp();
    AdvanceTimeAndUpdateEntities();
    Assert.IsTrue(isZoomed);
}
See Also