mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 08:50:25 +01:00
Fixed all instances of the bad pattern I could find
This commit is contained in:
@@ -1331,4 +1331,33 @@ public class DialogTests
|
||||
|
||||
return (Begin (dlg), dlg);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SetupFakeDriver]
|
||||
[TestRespondersDisposed]
|
||||
public void Run_Does_Not_Dispose_Dialog ()
|
||||
{
|
||||
Init ();
|
||||
Dialog dlg = new ();
|
||||
|
||||
dlg.Ready += Dlg_Ready;
|
||||
|
||||
Run (dlg);
|
||||
|
||||
#if DEBUG_IDISPOSABLE
|
||||
Assert.False (dlg.WasDisposed);
|
||||
#endif
|
||||
|
||||
dlg.Dispose ();
|
||||
|
||||
Shutdown();
|
||||
|
||||
return;
|
||||
|
||||
void Dlg_Ready (object sender, EventArgs e)
|
||||
{
|
||||
RequestStop ();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user