MainMenuTests Options 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 Options()
Examples

[Test, Ignore]
public void Options()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage 
    var mouse = Resolve<MockMouse>();
    Settings.Current.MusicVolume = 0.5f;
    Settings.Current.SoundVolume = 0.5f;
    ClickAtPosition(mouse, new Vector2D(0.31f, 0.59f));
    Assert.IsFalse(menu.Controls[0].IsVisible);
    bool changed = false;
    MainMenu.SettingsChanged += () => changed = true;
    DragMouse(mouse, 0.81f, ScreenSpace.Current.Viewport.Top + 0.46f);
    Assert.IsTrue(changed);
    changed = false;
    DragMouse(mouse, 0.81f, ScreenSpace.Current.Viewport.Top + 0.6f);
    Assert.IsTrue(changed);
    ClickAtPosition(mouse, new Vector2D(0.31f, ScreenSpace.Current.Bottom - 0.19f));
    Assert.IsTrue(menu.Controls[0].IsVisible);
}
See Also