I’ve got a winform that is an extension of another application. Bootstrapping this secondary application is a pain. I tried rendering the window in a unit test
[TestMethod]
public void ShowWindow()
{
SomeWindow window = new SomeWindow();
window.Show();
}
The window just flashes and disappears. I tried Sleeping the thread, but that just freezes the window and the visuals are all broke. There seems to be no WaitForExit() either.
How can I test my window for visual appeal?
You should call
ShowDialog(). But your test would then block until that returns.