mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Cleaned up MouseClick related stuff.
This commit is contained in:
@@ -38,7 +38,7 @@ public class WizardTests
|
||||
var firstIteration = true;
|
||||
Application.RunIteration (ref runstate, ref firstIteration);
|
||||
|
||||
wizard.NextFinishButton.OnAccept ();
|
||||
wizard.NextFinishButton.InvokeCommand (Command.Accept);
|
||||
Application.RunIteration (ref runstate, ref firstIteration);
|
||||
Application.End (runstate);
|
||||
Assert.True (finishedFired);
|
||||
@@ -64,13 +64,13 @@ public class WizardTests
|
||||
Application.RunIteration (ref runstate, ref firstIteration);
|
||||
|
||||
Assert.Equal (step1.Title, wizard.CurrentStep.Title);
|
||||
wizard.NextFinishButton.OnAccept ();
|
||||
wizard.NextFinishButton.InvokeCommand (Command.Accept);
|
||||
Assert.False (finishedFired);
|
||||
Assert.False (closedFired);
|
||||
|
||||
Assert.Equal (step2.Title, wizard.CurrentStep.Title);
|
||||
Assert.Equal (wizard.GetLastStep ().Title, wizard.CurrentStep.Title);
|
||||
wizard.NextFinishButton.OnAccept ();
|
||||
wizard.NextFinishButton.InvokeCommand (Command.Accept);
|
||||
Application.End (runstate);
|
||||
Assert.True (finishedFired);
|
||||
Assert.True (closedFired);
|
||||
@@ -99,7 +99,7 @@ public class WizardTests
|
||||
|
||||
Assert.Equal (step2.Title, wizard.CurrentStep.Title);
|
||||
Assert.Equal (wizard.GetLastStep ().Title, wizard.CurrentStep.Title);
|
||||
wizard.NextFinishButton.OnAccept ();
|
||||
wizard.NextFinishButton.InvokeCommand (Command.Accept);
|
||||
Application.End (runstate);
|
||||
Assert.True (finishedFired);
|
||||
Assert.True (closedFired);
|
||||
|
||||
@@ -191,13 +191,6 @@ public class ResponderTests
|
||||
"OnDrawContent"
|
||||
)
|
||||
);
|
||||
|
||||
Assert.True (
|
||||
Responder.IsOverridden (
|
||||
new Button { Text = "Button overrides OnMouseEvent" },
|
||||
"OnMouseEvent"
|
||||
)
|
||||
);
|
||||
#if DEBUG_IDISPOSABLE
|
||||
|
||||
// HACK: Force clean up of Responders to avoid having to Dispose all the Views created above.
|
||||
|
||||
@@ -1161,7 +1161,7 @@ At 0,0
|
||||
|
||||
view.Accept += ViewOnAccept;
|
||||
|
||||
view.OnAccept ();
|
||||
view.InvokeCommand (Command.Accept);
|
||||
Assert.True (accepted);
|
||||
|
||||
return;
|
||||
@@ -1176,7 +1176,7 @@ At 0,0
|
||||
|
||||
view.Accept += ViewOnAccept;
|
||||
|
||||
var ret = view.OnAccept ();
|
||||
var ret = view.InvokeCommand (Command.Accept);
|
||||
Assert.True (ret);
|
||||
Assert.True (acceptInvoked);
|
||||
|
||||
|
||||
@@ -693,7 +693,7 @@ public class ButtonTests
|
||||
|
||||
button.Accept += ButtonAccept;
|
||||
|
||||
var ret = button.OnAccept ();
|
||||
var ret = button.InvokeCommand (Command.Accept);
|
||||
Assert.True (ret);
|
||||
Assert.True (acceptInvoked);
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ public class CheckBoxTests
|
||||
|
||||
ckb.Accept += ViewOnAccept;
|
||||
|
||||
var ret = ckb.OnAccept ();
|
||||
var ret = ckb.InvokeCommand (Command.Accept);
|
||||
Assert.True (ret);
|
||||
Assert.True (acceptInvoked);
|
||||
|
||||
@@ -567,13 +567,13 @@ public class CheckBoxTests
|
||||
var cb = new CheckBox ();
|
||||
var accepted = false;
|
||||
|
||||
cb.Accept += ButtonOnAccept;
|
||||
cb.Accept += CheckBoxOnAccept;
|
||||
cb.InvokeCommand (Command.HotKey);
|
||||
|
||||
Assert.True (accepted);
|
||||
|
||||
return;
|
||||
void ButtonOnAccept (object sender, CancelEventArgs e) { accepted = true; }
|
||||
void CheckBoxOnAccept (object sender, CancelEventArgs e) { accepted = true; }
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
||||
Reference in New Issue
Block a user