From bdcc62e0d590613448dcad98547e961c3b869e07 Mon Sep 17 00:00:00 2001 From: "Arash A. Sabet" <26050123+Arash-Sabet@users.noreply.github.com> Date: Sat, 18 Feb 2023 10:34:31 -0500 Subject: [PATCH 1/3] Updated the README.md file #156 --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 247093c..7cb96fe 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,6 @@ # Xunit Dependency Injection framework -*(The source code of the .NET 7.0 version of this library is retained in [the fork of this repo](https://github.com/Umplify/xunit-dependency-injection-NET7) while the .NET 6.0 version of this library is maintained and supported in this repo.)* - ---- - Xunit does not support any built-in dependency injection features, therefore developers have to come up with a solution to recruit their favourite dependency injection framework in their tests. This library brings in Microsoft's dependency injection container to Xunit by leveraging Xunit's fixture. From 366944041cdd9480e35d24517b02017d0f44e419 Mon Sep 17 00:00:00 2001 From: Arash Sabet Date: Sat, 18 Feb 2023 10:55:00 -0500 Subject: [PATCH 2/3] Updated the build pipelines #156 --- azure-pipeline-PR.yml | 2 +- azure-pipelines.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipeline-PR.yml b/azure-pipeline-PR.yml index ac73368..9997711 100644 --- a/azure-pipeline-PR.yml +++ b/azure-pipeline-PR.yml @@ -17,7 +17,7 @@ steps: displayName: 'Use .NET 7.0 sdk' inputs: packageType: sdk - version: 7.0.100 + version: 7.0.103 installationPath: $(Agent.ToolsDirectory)/dotnet - script: echo Started restoring the source code - task: DotNetCoreCLI@2 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2e9193c..46d9fc4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,7 +24,7 @@ steps: displayName: 'Use .NET 7.0 sdk' inputs: packageType: sdk - version: 7.0.100 + version: 7.0.103 installationPath: $(Agent.ToolsDirectory)/dotnet - script: echo Started restoring the source code - task: DotNetCoreCLI@2 From 75bc5d877027075c4af3c9a58e8df159b204ac32 Mon Sep 17 00:00:00 2001 From: Arash Sabet Date: Sat, 18 Feb 2023 10:55:14 -0500 Subject: [PATCH 3/3] Upgraded NuGet packages #156 --- .../Xunit.Microsoft.DependencyInjection.ExampleTests.csproj | 4 ++-- src/Logging/NilLoggerProvider.cs | 2 +- src/Logging/OutputLogger.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj b/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj index 26e05d9..afbd882 100644 --- a/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj +++ b/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/src/Logging/NilLoggerProvider.cs b/src/Logging/NilLoggerProvider.cs index 34be929..5625fdc 100644 --- a/src/Logging/NilLoggerProvider.cs +++ b/src/Logging/NilLoggerProvider.cs @@ -11,7 +11,7 @@ public void Dispose() private class NilLogger : ILogger { - public IDisposable BeginScope(TState state) + public IDisposable? BeginScope(TState state) where TState : notnull => new NoOpDisposable(); public bool IsEnabled(LogLevel logLevel) diff --git a/src/Logging/OutputLogger.cs b/src/Logging/OutputLogger.cs index 8c9747d..99543db 100644 --- a/src/Logging/OutputLogger.cs +++ b/src/Logging/OutputLogger.cs @@ -16,7 +16,7 @@ public OutputLogger(string categoryName, ITestOutputHelper testOutputHelper) _categoryName = categoryName; } - public IDisposable BeginScope(TState state) + public IDisposable? BeginScope(TState state) where TState : notnull => new NoOpDisposable(); public bool IsEnabled(LogLevel logLevel)