Skip to content

Commit

Permalink
xunit 2.6.0 (#14618)
Browse files Browse the repository at this point in the history
  • Loading branch information
agriffard authored Nov 1, 2023
1 parent 1cdb3dc commit b51e075
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<PackageManagement Include="StackExchange.Redis" Version="2.6.122" />
<PackageManagement Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageManagement Include="System.Linq.Async" Version="6.0.1" />
<PackageManagement Include="xunit" Version="2.5.3" />
<PackageManagement Include="xunit" Version="2.6.0" />
<PackageManagement Include="xunit.analyzers" Version="1.4.0" />
<PackageManagement Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageManagement Include="YesSql" Version="3.4.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/docs/resources/libraries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ The below table lists the different Tests libraries:
| [Cypress Orchard](https://www.npmjs.com/package/cypress-orchardcore) | A collection of cypress commands for Orchard Core. | 0.4.5 | MIT |
| [Moq](https://github.com/moq/moq) | The most popular and friendly mocking framework for .NET. | 4.18.4 | [MIT](https://github.com/moq/moq/blob/main/LICENSE) |
| [VS Test SDK](https://github.com/microsoft/vstest/) | Visual Studio Test Platform. | 17.7.2 | [MIT](https://github.com/microsoft/vstest/blob/master/LICENSE) |
| [xUnit](https://github.com/xunit/xunit) | Free, open source, community-focused unit testing tool for the .NET Framework. | 2.5.3 | [MIT](https://github.com/xunit/xunit/blob/main/LICENSE) |
| [xUnit](https://github.com/xunit/xunit) | Free, open source, community-focused unit testing tool for the .NET Framework. | 2.6.0 | [MIT](https://github.com/xunit/xunit/blob/main/LICENSE) |
| [xUnit Analyzers](https://github.com/xunit/xunit.analyzers) | Roslyn analyzers for xUnit.net. | 1.4.0 | [MIT](https://github.com/xunit/xunit.analyzers/blob/main/LICENSE) |
| [xUnit VS runner](https://github.com/xunit/visualstudio.xunit) | VSTest runner for xUnit.net. | 2.5.3 | [MIT](https://github.com/xunit/visualstudio.xunit/blob/main/License.txt) |
12 changes: 6 additions & 6 deletions test/OrchardCore.Tests/Commands/CommandHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task TestFooCommand()
[Fact]
public async Task TestNotExistingCommand()
{
await Assert.ThrowsAsync<InvalidOperationException>(async () =>
await Assert.ThrowsAsync<InvalidOperationException>(async Task () =>
{
var commandContext = CreateCommandContext("NoSuchCommand");
await _handler.ExecuteAsync(commandContext);
Expand Down Expand Up @@ -118,7 +118,7 @@ public async Task TestSwitchForCommandWithoutSupportForIt()
{
var switches = new Dictionary<string, string> { { "User", "OrchardUser" } };
var commandContext = CreateCommandContext("Foo", switches);
await Assert.ThrowsAsync<InvalidOperationException>(async () => await _handler.ExecuteAsync(commandContext));
await Assert.ThrowsAsync<InvalidOperationException>(async Task () => await _handler.ExecuteAsync(commandContext));
}

[Fact]
Expand All @@ -134,7 +134,7 @@ public async Task TestNotExistingSwitch()
{
var switches = new Dictionary<string, string> { { "ThisSwitchDoesNotExist", "Insignificant" } };
var commandContext = CreateCommandContext("Foo", switches);
await Assert.ThrowsAsync<InvalidOperationException>(async () => await _handler.ExecuteAsync(commandContext));
await Assert.ThrowsAsync<InvalidOperationException>(async Task () => await _handler.ExecuteAsync(commandContext));
}

[Fact]
Expand Down Expand Up @@ -175,21 +175,21 @@ public async Task TestCommandArgumentsArePassedCorrectlyWithNormalParametersAndA
public async Task TestCommandParamsMismatchWithoutParamsNotEnoughArguments()
{
var commandContext = CreateCommandContext("Concat", new Dictionary<string, string>(), new[] { "left to " });
await Assert.ThrowsAsync<InvalidOperationException>(async () => await _handler.ExecuteAsync(commandContext));
await Assert.ThrowsAsync<InvalidOperationException>(async Task () => await _handler.ExecuteAsync(commandContext));
}

[Fact]
public async Task TestCommandParamsMismatchWithoutParamsTooManyArguments()
{
var commandContext = CreateCommandContext("Foo", new Dictionary<string, string>(), new[] { "left to " });
await Assert.ThrowsAsync<InvalidOperationException>(async () => await _handler.ExecuteAsync(commandContext));
await Assert.ThrowsAsync<InvalidOperationException>(async Task () => await _handler.ExecuteAsync(commandContext));
}

[Fact]
public async Task TestCommandParamsMismatchWithParamsButNotEnoughArguments()
{
var commandContext = CreateCommandContext("ConcatAllParams", new Dictionary<string, string>());
await Assert.ThrowsAsync<InvalidOperationException>(async () => await _handler.ExecuteAsync(commandContext));
await Assert.ThrowsAsync<InvalidOperationException>(async Task () => await _handler.ExecuteAsync(commandContext));
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/OrchardCore.Tests/Localization/CultureScopeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async Task CultureScopeSetsOrginalCulturesOnException()
var uiCulture = CultureInfo.CurrentUICulture;

// Act & Assert
await Assert.ThrowsAsync<Exception>(() =>
await Assert.ThrowsAsync<Exception>(Task () =>
{
using var cultureScope = CultureScope.Create("FR");
throw new Exception("Something goes wrong!!");
Expand Down

0 comments on commit b51e075

Please sign in to comment.