Skip to content

Commit

Permalink
Update Xunit to 2.5.
Browse files Browse the repository at this point in the history
Use 2.5.1-pre.4 to get the fix for xunit/xunit#2741.
  • Loading branch information
bgrainger committed Jul 13, 2023
1 parent 74c0eaa commit a460619
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="myget.org" value="https://www.myget.org/F/xunit/api/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.2" />
<PackageReference Include="xunit" Version="2.5.1-pre.4" />
<PackageReference Include="xunit.extensibility.execution" Version="2.5.1-pre.4" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/AdoNet.Specification.Tests/CommandTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ public virtual void Execute_throws_for_unknown_ParameterValue_type()
catch (Exception ex) when (ex is NotSupportedException || ex is InvalidOperationException)
{
}
catch (Exception ex) when (!(ex is UnexpectedValueException))
catch (Exception ex) when (ex is not UnexpectedValueException)
{
throw new ThrowsException(typeof(NotSupportedException), ex);
throw ThrowsException.ForIncorrectExceptionType(typeof(NotSupportedException), ex);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/AdoNet.Specification.Tests/DataReaderTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ public virtual void GetColumnSchema_DataType()
case TypeCode.UInt64:
return;
}
Assert.True(false, "DataType isn't numeric");
Assert.Fail("DataType isn't numeric");
}

private void TestGetTextReader(ValueKind valueKind, string expected)
Expand Down
8 changes: 4 additions & 4 deletions src/AdoNet.Specification.Tests/DbFactoryTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected static Exception AssertThrowsAny<TException1, TException2>(Action acti
try
{
action();
throw new ThrowsException(typeof(TException1));
throw ThrowsException.ForNoException(typeof(TException1));
}
catch (TException1 ex)
{
Expand All @@ -83,7 +83,7 @@ protected static Exception AssertThrowsAny<TException1, TException2>(Action acti
}
catch (Exception ex)
{
throw new ThrowsException(typeof(TException1), ex);
throw ThrowsException.ForIncorrectExceptionType(typeof(TException1), ex);
}
}

Expand All @@ -95,7 +95,7 @@ protected static Exception AssertThrowsAny<TException1, TException2, TException3
try
{
action();
throw new ThrowsException(typeof(TException1));
throw ThrowsException.ForNoException(typeof(TException1));
}
catch (TException1 ex)
{
Expand All @@ -111,7 +111,7 @@ protected static Exception AssertThrowsAny<TException1, TException2, TException3
}
catch (Exception ex)
{
throw new ThrowsException(typeof(TException1), ex);
throw ThrowsException.ForIncorrectExceptionType(typeof(TException1), ex);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/AdoNet.Specification.Tests/GetValueConversionTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected virtual void TestException<T>(DbType dbType, ValueKind kind, Func<DbDa
}
catch (Exception ex)
{
throw new ThrowsException(exceptionType, ex);
throw ThrowsException.ForIncorrectExceptionType(exceptionType, ex);
}
});

Expand All @@ -65,7 +65,7 @@ await DoTestAsync(dbType, kind, async reader =>
}
catch (Exception ex)
{
throw new ThrowsException(exceptionType, ex);
throw ThrowsException.ForIncorrectExceptionType(exceptionType, ex);
}
});

Expand Down
4 changes: 2 additions & 2 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="xunit" Version="2.5.1-pre.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
</ItemGroup>
</Project>

0 comments on commit a460619

Please sign in to comment.