Skip to main content
net6.0net6.0-android31.0net6.0-ios15.4net6.0-maccatalyst15.4net6.0-windows10.0.19041

MAUI devices xunit runner

Published
Aug 3, 2022
4y ago
Total Downloads
50.0K
50,001

Install

dotnet add package Shiny.Xunit.Runners.Maui --version 1.0.0
ProductVersions
.NET
net6.0net6.0-android31.0net6.0-ios15.4net6.0-maccatalyst15.4net6.0-windows10.0.19041

README

Xunit.Runners.Maui

Ported From

Setup

  1. Create a new MAUI application.
  2. Delete the standard App.xaml & App.xaml.cs
  3. Install Xunit.Runners.Maui nuget
  4. Create tests in this project or reference another project containing your tests.
  5. Create a MauiProgram like shown below - NOTE: It is not recommended you put any dependencies here
using Xunit.Runners.Maui;

namespace Sample
{
	public static class MauiProgram
	{
		public static MauiApp CreateMauiApp() => MauiApp
			.CreateBuilder()
			.ConfigureTests(new TestOptions
			{
				Assemblies =
				{
					typeof(MauiProgram).Assembly
				}
			})
			.UseVisualRunner()
			.Build();
	}
}

Changes from Previous Version

v1.0.0-alpha-0008v1.0.0
Removed Dependencies
Microsoft.Maui.Dependencies(net6.0-android31.0)
Microsoft.Maui.Extensions(net6.0-android31.0)
Microsoft.Maui.Dependencies(net6.0-maccatalyst15.4)
Microsoft.Maui.Extensions(net6.0-maccatalyst15.4)
Microsoft.Maui.Dependencies(net6.0-windows10.0.19041)
Microsoft.Maui.Extensions(net6.0-windows10.0.19041)

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 5 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.