FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

VerifyTests/Verify.WinForms: Extends Verify to allow verification of WinForms UIs. · GitHub

Repository navigation

Repository files navigation

Verify.WinForms

Extends Verify to allow verification of WinForms UIs.

See Milestones for release notes.

Sponsors

Entity Framework Extensions

Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.

Developed using JetBrains IDEs

NuGet

Usage

[ModuleInitializer]
public static void Init() =>
    VerifyWinForms.Initialize();

snippet source | anchor

Form

A visual element (Form/Control etc) can be verified as follows:

[Test]
public Task FormUsage() =>
    Verify(new MyForm());

snippet source | anchor

With the state of the element being rendered as a verified file:

TheTests.FormUsage.Net.verified.png:

ContextMenuStrip

A ContextMenuStrip can be verified as follows:

[Test]
public Task ContextMenuStrip()
{
    var menu = new ContextMenuStrip();
    var items = menu.Items;

    items.Add(new ToolStripMenuItem("About"));
    items.Add(new ToolStripMenuItem("Exit"));
    return Verify(menu);
}

snippet source | anchor

With the state of the element being rendered as a verified file:

TheTests.FormUsage.Net.verified.png:

OS specific rendering

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:

Icon

Gem designed by Adnen Kadri from The Noun Project.

About

Extends Verify to allow verification of WinForms UIs.

Resources

Code of conduct

Stars

7 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL