From f8df79b90c98a46135503106453dea57013d50b7 Mon Sep 17 00:00:00 2001 From: Weihan Li Date: Sat, 2 Dec 2023 23:34:41 +0800 Subject: [PATCH 1/2] docs: mention package reference for logging feature mention package reference for logging feature in README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 85c604f..6837005 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ public class Startup If you use MinimalApi rather than asp.net core Startup class. +Add package reference for `Xunit.DependencyInjection.AspNetCoreTesting` + ``` bash dotnet add package Xunit.DependencyInjection.AspNetCoreTesting ``` @@ -226,6 +228,12 @@ internal class DependencyClass : IDependency ## Write `Microsoft.Extensions.Logging` to `ITestOutputHelper` +Add package reference for `Xunit.DependencyInjection.Logging` + +```sh +dotnet add package Xunit.DependencyInjection.Logging +``` + > The call chain must be from the test case. If not, this feature will not work. ``` C# From f0f84b5d99b9531726eb03ba2c3d78fa96b48c68 Mon Sep 17 00:00:00 2001 From: Weihan Li Date: Sun, 3 Dec 2023 07:38:15 +0800 Subject: [PATCH 2/2] align bash and sh --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6837005..e75b1a1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Install the [Nuget](https://www.nuget.org/packages/Xunit.DependencyInjection) package. -``` bash +``` sh dotnet add package Xunit.DependencyInjection ``` @@ -54,7 +54,7 @@ public class MyAwesomeTests ### Asp.Net Core Startup -``` bash +``` sh dotnet add package Microsoft.AspNetCore.TestHost ``` @@ -74,7 +74,7 @@ If you use MinimalApi rather than asp.net core Startup class. Add package reference for `Xunit.DependencyInjection.AspNetCoreTesting` -``` bash +``` sh dotnet add package Xunit.DependencyInjection.AspNetCoreTesting ```