Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xunit 2.6.0 #14618

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading