Skip to content

Commit

Permalink
Merge pull request #6 from Umplify/issue-156
Browse files Browse the repository at this point in the history
Updated the README.md file #156
  • Loading branch information
Arash-Sabet authored Feb 18, 2023
2 parents 9781e6f + 75bc5d8 commit c6901bf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion azure-pipeline-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<PackageReference Include="coverlet.collector" Version="3.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/Logging/NilLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public void Dispose()

private class NilLogger : ILogger
{
public IDisposable BeginScope<TState>(TState state)
public IDisposable? BeginScope<TState>(TState state) where TState : notnull
=> new NoOpDisposable();

public bool IsEnabled(LogLevel logLevel)
Expand Down
2 changes: 1 addition & 1 deletion src/Logging/OutputLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public OutputLogger(string categoryName, ITestOutputHelper testOutputHelper)
_categoryName = categoryName;
}

public IDisposable BeginScope<TState>(TState state)
public IDisposable? BeginScope<TState>(TState state) where TState : notnull
=> new NoOpDisposable();

public bool IsEnabled(LogLevel logLevel)
Expand Down

0 comments on commit c6901bf

Please sign in to comment.