Unit-Tests.Common 1.0.0

dotnet add package Unit-Tests.Common --version 1.0.0
                    
NuGet\Install-Package Unit-Tests.Common -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Unit-Tests.Common" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Unit-Tests.Common" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Unit-Tests.Common" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Unit-Tests.Common --version 1.0.0
                    
#r "nuget: Unit-Tests.Common, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Unit-Tests.Common@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Unit-Tests.Common&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Unit-Tests.Common&version=1.0.0
                    
Install as a Cake Tool

Unit Tests.Common

Dependency library for all XUnit projects named "Unit Test"

Description
CREATED BY: Latency McLaughlin
UPDATED: 10/14/2026
FRAMEWORKS: net45, net451, net452, net46, net461, net462, net47, net471, net472, net48, net481, netstandard2.0, netstandard2.1, net8.0, net9.0, net10.0, net11.0
LANGUAGE: C# preview
OUTPUT TYPE: Library API
SUPPORTS: Visual Studio
GFX SUBSYS: [None]
TAGS: API, .NET, Unit Tests
STATUS: workflow-badge
LICENSE: license-badge
VERSION: 1.0.0

Usage

Derive your test classes from Tests (or Base) and pass the xUnit ITestOutputHelper through the constructor. Tests also loads the environment variables from Properties\launchSettings.json (when present) before your tests run.

using Unit_Tests.Common;

public class MyTests(ITestOutputHelper console) : Tests(console)
{
    [Fact]
    public void Example()
    {
        Console.WriteLine("Hello from a unit test");
        Assert.True(true);
    }
}

The package selects the matching test framework for each target framework:

  • .NET Framework 4.5 - 4.7.1 and .NET Standard: xUnit 2.x
  • .NET Framework 4.7.2+ and .NET 8+: xUnit v3

Installation

This library can be installed from NuGet.

Donation

If you want to donate to my efforts on this project, please use the following link,

Donate via Paypal

License

The source code for the site is licensed under the MIT license, which you can find in the MIT-LICENSE.txt file.


Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 32 10/14/2026

Initial Release