Extends Verify to allow verification of WinForms UIs.
See Milestones for release notes.
Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.
[ModuleInitializer]publicstaticvoidInit()=>VerifyWinForms.Initialize();A visual element (Form/Control etc) can be verified as follows:
[Test]publicTaskFormUsage()=>Verify(newMyForm());With the state of the element being rendered as a verified file:
TheTests.FormUsage.Net.verified.png:
A ContextMenuStrip can be verified as follows:
[Test]publicTaskContextMenuStrip(){varmenu=newContextMenuStrip();varitems=menu.Items;items.Add(newToolStripMenuItem("About"));items.Add(newToolStripMenuItem("Exit"));returnVerify(menu);}With the state of the element being rendered as a verified file:
TheTests.FormUsage.Net.verified.png:
The rendering of Form elements can very slightly between different OS versions. This can make verification on different machines (eg CI) problematic. There are several approaches to mitigate this:
- Using a custom comparer
Gem designed by Adnen Kadri from The Noun Project.



