Namespace Cuemon.Extensions.Xunit.Hosting.AspNetCore
The Cuemon.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.
Availability: .NET 8, .NET 7 and .NET 6
Complements: Microsoft.AspNetCore.TestHost namespace 🔗
Extension Methods
Type | Ext | Methods |
---|---|---|
IServiceCollection | ⬇️ | AddFakeHttpContextAccessor |
Classes
AspNetCoreHostFixture
Provides a default implementation of the IAspNetCoreHostFixture interface.
AspNetCoreHostTest<T>
Represents a base class from which all implementations of unit testing, that uses Microsoft Dependency Injection and depends on ASP.NET Core, should derive.
MiddlewareTestFactory
Provides a set of static methods for ASP.NET Core middleware unit testing.
ServiceCollectionExtensions
Extension methods for the Microsoft.Extensions.DependencyInjection.IServiceCollection interface.
Interfaces
IAspNetCoreHostFixture
Provides a way to use Microsoft Dependency Injection in unit tests tailored for ASP.NET Core.
IMiddlewareTest
Represents the members needed for ASP.NET Core middleware testing.
IPipelineTest
Represents the members needed for ASP.NET Core pipeline testing.