TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit
1.0.0
dotnet add package TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit --version 1.0.0
NuGet\Install-Package TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit -Version 1.0.0
<PackageReference Include="TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit" Version="1.0.0" />
<PackageVersion Include="TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit" Version="1.0.0" />
<PackageReference Include="TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit" />
paket add TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit --version 1.0.0
#r "nuget: TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit, 1.0.0"
#:package TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit@1.0.0
#addin nuget:?package=TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit&version=1.0.0
#tool nuget:?package=TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit&version=1.0.0
TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit
This project depends on WPF Pilot, licensed under the WPF Pilot Split License. See the WPF Pilot license for applicable licensing terms.
Two NUnit base test classes to launch the TWindow in an app that uses --window=FullyQualifiedNameOfWindow.
WPFPilotTestBase
The exe is in the test output directory and is named the same as the assembly containing TWindow.
public abstract class WPFPilotTestBase<TWindow> where TWindow : Window
{
protected AppDriver AppDriver { get; private set; } = null!;
[SetUp]
public void SetUp()
=> AppDriver = AppDriverWindowLauncher.LaunchWindow<TWindow>(GetExePath());
private static string GetExePath()
{
var assemblyName = typeof(TWindow).Assembly.GetName().Name
?? throw new InvalidOperationException(
$"Could not determine assembly name for {typeof(TWindow).FullName}");
return Path.Combine(
AppContext.BaseDirectory,
$"{assemblyName}.exe");
}
[TearDown]
public void TearDown() => AppDriver.Dispose();
}
SlnConventionWPFPilotTestBase
Exe path by convention.
e.g given test in assembly
"\TonyHallett.WPFExtras\TonyHallett.WPFExtras.UITests\bin\Debug\net10.0-windows\TonyHallett.WPFExtras.UITests.dll"
and TWindow in assembly TonyHallett.WPFExtras.TestHost
will replace the directory, TonyHallett.WPFExtras.UITests, in the path above with TonyHallett.WPFExtras.TestHost and have the exe file name as TonyHallett.WPFExtras.TestHost.exe
public abstract class SlnConventionWPFPilotTestBase<TWindow> where TWindow : Window
{
protected AppDriver AppDriver { get; private set; } = null!;
[SetUp]
public void SetUp()
=> AppDriver = SlnConventionAppDriverWindowLauncher.LaunchWindow<TWindow>(GetType().Assembly);
[TearDown]
public void TearDown() => AppDriver.Dispose();
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- NUnit (>= 4.3.2)
- TonyHallett.WPFExtras.TestTools.WPFPilot (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 98 | 9/7/2026 |