ButtonTests BeginClickOutside Method Delta Engine Documentation

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

public void BeginClickOutside()
Examples

[Test, CloseAfterFirstFrame]
public void BeginClickOutside()
{
    SetMouseState(State.Pressing, Vector2D.One);
    Assert.IsFalse(button.State.IsPressed);
}
[Test, CloseAfterFirstFrame]
public void BeginClickOutsideAndEndInside()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage 
    bool clicked = false;
    button.Clicked += () => clicked = true;
    PressAndReleaseMouse(Vector2D.Zero, Vector2D.Half);
    Assert.IsFalse(clicked);
    Assert.IsFalse(button.State.IsPressed);
}
See Also