All Projects → VerifyTests → Verify.Xaml

VerifyTests / Verify.Xaml

Licence: MIT license
Extends Verify to allow verification of Xaml UIs

Programming Languages

C#
18002 projects

Verify.Xaml

Build status NuGet Status

Extends Verify to allow verification of Xaml UIs.

NuGet package

https://nuget.org/packages/Verify.Xaml/

Usage

[ModuleInitializer]
public static void Init() =>
    VerifyXaml.Enable();

snippet source | anchor

A visual element (Window/Page/Control etc) can then be verified as follows:

[Test]
public async Task WindowUsage()
{
    var window = new MyWindow();
    await Verify(window);
}

snippet source | anchor

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

TheTests.WindowUsage.00.verified.xml:

TheTests.WindowUsage.01.verified.png:

OS specific rendering

The rendering of XAML 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].