Fixed all instances of the bad pattern I could find

This commit is contained in:
Tig
2024-03-19 14:56:55 -07:00
parent 6badd0de12
commit bf77b3153d
25 changed files with 143 additions and 41 deletions

View File

@@ -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 ();
}
}
}