Codebelt.Extensions.Xunit.Hosting 9.0.0-preview.5

This is a prerelease version of Codebelt.Extensions.Xunit.Hosting.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Codebelt.Extensions.Xunit.Hosting --version 9.0.0-preview.5                
NuGet\Install-Package Codebelt.Extensions.Xunit.Hosting -Version 9.0.0-preview.5                
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="Codebelt.Extensions.Xunit.Hosting" Version="9.0.0-preview.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Codebelt.Extensions.Xunit.Hosting --version 9.0.0-preview.5                
#r "nuget: Codebelt.Extensions.Xunit.Hosting, 9.0.0-preview.5"                
#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.
// Install Codebelt.Extensions.Xunit.Hosting as a Cake Addin
#addin nuget:?package=Codebelt.Extensions.Xunit.Hosting&version=9.0.0-preview.5&prerelease

// Install Codebelt.Extensions.Xunit.Hosting as a Cake Tool
#tool nuget:?package=Codebelt.Extensions.Xunit.Hosting&version=9.0.0-preview.5&prerelease                

About

An open-source project (MIT license) that targets and complements the xUnit.net test platform. It provides a uniform and convenient way of doing unit test for all project types in .NET.

It is, by heart, free, flexible and built to extend and boost your agile codebelt.

Codebelt.Extensions.Xunit.Hosting for .NET

The Codebelt.Extensions.Xunit.Hosting namespace contains types that provides a uniform way of doing unit testing that is used in conjunction with Microsoft Dependency Injection. The namespace relates to the Xunit.Abstractions namespace.

More documentation available at our documentation site:

CSharp Example

Source: AspNetCoreHostTestTest.cs

public class AspNetCoreHostTestTest : AspNetCoreHostTest<AspNetCoreHostFixture>
{
    private readonly IServiceProvider _provider;

    public AspNetCoreHostTestTest(AspNetCoreHostFixture hostFixture, ITestOutputHelper output) : base(hostFixture, output)
    {
        _provider = hostFixture.ServiceProvider;
        _provider.GetRequiredService<ITestOutputHelperAccessor>().TestOutput = output;
    }

    // intentionally left out for brevity

    public override void ConfigureServices(IServiceCollection services)
    {
        services.AddXunitTestLoggingOutputHelperAccessor();
        services.AddXunitTestLogging(TestOutput);
    }
}
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. 
.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 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
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 (2)

Showing the top 2 NuGet packages that depend on Codebelt.Extensions.Xunit.Hosting:

Package Downloads
Codebelt.Extensions.Xunit.Hosting.AspNetCore

The Codebelt.Extensions.Xunit.Hosting.AspNetCore namespace contains types that provides a uniform way of doing unit testing that depends on ASP.NET Core and used in conjunction with Microsoft Dependency Injection. The namespace relates to the Microsoft.AspNetCore.TestHost namespace.

Codebelt.Extensions.Xunit.App

Provides a convenient set of default API additions for building .NET test projects based on xUnit.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.0 973 11/13/2024
9.0.0-rc.1 507 11/11/2024
9.0.0-preview.11 119 10/26/2024
9.0.0-preview.10 225 10/9/2024
9.0.0-preview.9 286 10/6/2024
9.0.0-preview.8 191 10/4/2024
9.0.0-preview.7 50 10/3/2024
9.0.0-preview.6 129 10/1/2024
9.0.0-preview.5 48 9/30/2024
9.0.0-preview.4 387 9/25/2024
9.0.0-preview.3 46 9/23/2024
9.0.0-preview.2 133 9/17/2024
9.0.0-preview.1 72 9/15/2024
8.4.1 454 9/16/2024
8.4.0 167 9/15/2024

Version 9.0.0
Availability: .NET 9, .NET 8 and .NET Standard 2.0
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
- REMOVED Support for TFM .NET 6 (LTS)
 
# Breaking Changes
- REMOVED AddXunitTestLogging overloaded extension method from the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace
 
Version 8.4.1
Availability: .NET 8, .NET 6 and .NET Standard 2.0
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
# Breaking Changes
- RENAMED AddXunitTestOutputHelperAccessor and AddXunitTestOutputHelperAccessor{T} on the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace to AddXunitTestLoggingOutputHelperAccessor and AddXunitTestLoggingOutputHelperAccessor{T} (for consistency)
 
# New Features
- EXTENDED ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace with one new extension method for the IServiceCollection interface: An overload of AddXunitTestLogging
 
Version 8.4.0
Availability: .NET 8, .NET 6 and .NET Standard 2.0
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
# New Features
- ADDED ServiceProviderExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace that consist of one extension method for the IServiceProvider interface: GetRequiredScopedService
- EXTENDED ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace with two new extension methods for the IServiceCollection interface: AddXunitTestOutputHelperAccessor and AddXunitTestOutputHelperAccessor{T}
 
Version 8.3.2
Availability: .NET 8, .NET 6 and .NET Standard 2.0
 
# ALM
- REMOVED Support for TFM .NET 7 (STS)
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
Version 8.3.1
Availability: .NET 8, .NET 7, .NET 6 and .NET Standard 2.0
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
Version 8.2.0
Availability: .NET 8, .NET 7, .NET 6 and .NET Standard 2.0
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
Version: 8.1.0
Availability: .NET 8, .NET 7, .NET 6 and .NET Standard 2.0
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
# New Features
- ADDED LoggerExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace that consist of extension methods for the ILogger{T} interface: GetTestStore{T}
- ADDED ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace that consist of extension methods for the IServiceCollection interface: AddXunitTestLogging
- ADDED XunitTestLoggerEntry record in the Codebelt.Extensions.Xunit.Hosting namespace that represents a captured log-entry for testing purposes
 
Version: 8.0.1
Availability: .NET 8, .NET 7, .NET 6 and .NET Standard 2.0
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
Version: 8.0.0
Availability: .NET 8, .NET 7, .NET 6 and .NET Standard 2.0
 
# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
 
# Breaking Changes
- REMOVED CreateGenericHostTest method from GenericHostTestFactory class in the Codebelt.Extensions.Xunit.Hosting namespace
 
# Bug Fixes
- FIXED HostFixture class in the Codebelt.Extensions.Xunit.Hosting namespace by adding a null conditional operator to the ServiceProvider property