public void TwoResponds ()
{
// When Respond is called twice before leaving an event handler, the last call is the good one
using (var win = new Dialog ()) {
Application.TimeoutInvoke (10, delegate {
win.Respond (Command.Ok);
win.Respond (Command.Apply);
return false;
});
var cmd = win.Run ();
Assert.AreEqual (Command.Apply, cmd);
}
}