Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinyorg/xunit-maui
XUnit Device Runner for MAUI
https://github.com/shinyorg/xunit-maui
dotnet maui unit-testing
Last synced: about 3 hours ago
JSON representation
XUnit Device Runner for MAUI
- Host: GitHub
- URL: https://github.com/shinyorg/xunit-maui
- Owner: shinyorg
- Created: 2022-06-07T19:20:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-03T17:25:38.000Z (over 2 years ago)
- Last Synced: 2024-10-30T16:20:08.382Z (7 days ago)
- Topics: dotnet, maui, unit-testing
- Language: C#
- Homepage:
- Size: 176 KB
- Stars: 32
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Xunit.Runners.Maui
## Ported From
* https://github.com/xunit/devices.xunit
* https://github.com/dotnet/maui/tree/main/src/TestUtils## 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```csharp
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();
}
}
```