/Verify.Xaml

Extends Verify to allow verification of Xaml UIs

Primary LanguageC#MIT LicenseMIT

Verify.Xaml

Build status NuGet Status

Extends Verify to allow verification of Xaml UIs.

NuGet package

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

Usage

Enable VerifyXaml once at assembly load time:

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.