Skip to content

Commit

Permalink
chore: Update to xUnit 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
smartjoker0117 committed Aug 3, 2023
1 parent df1f887 commit e74feaf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CommonProperties.Test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

<!-- Common dependencies. Not *all* projects need all of these, but enough to make it worth doing. -->
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="Xunit.Combinatorial" Version="1.5.25" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
<PackageReference Include="Moq" Version="4.18.4" />
</ItemGroup>

Expand Down
5 changes: 5 additions & 0 deletions Google.Api.Gax.Grpc.Tests/BufferedClientStreamWriterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
using System.Threading.Tasks;
using Xunit;

// xUnit2014: "Do not use throws check to check for asynchronously thrown exception"
// This is suppressed in the tests below as we're often testing that the exception
// is thrown immediately, synchronously.
#pragma warning disable xUnit2014

namespace Google.Api.Gax.Grpc.Tests
{
public class BufferedClientStreamWriterTest
Expand Down
6 changes: 3 additions & 3 deletions Google.Api.Gax.Tests/Json/JsonTokenizerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,14 @@ private static void AssertTokensNoReplacement(string json, params JsonToken[] ex
var actualToken = tokenizer.Next();
if (actualToken == JsonToken.EndDocument)
{
Assert.False(true, $"Expected {expectedTokens[i]} but reached end of token stream");
Assert.Fail($"Expected {expectedTokens[i]} but reached end of token stream");
}
Assert.Equal(expectedTokens[i], actualToken);
}
var finalToken = tokenizer.Next();
if (finalToken != JsonToken.EndDocument)
{
Assert.False(true, "Expected token stream to be exhausted; received ${finalToken}");
Assert.Fail("Expected token stream to be exhausted; received ${finalToken}");
}
}

Expand All @@ -360,7 +360,7 @@ private static void AssertThrowsAfter(string json, params JsonToken[] expectedTo
var actualToken = tokenizer.Next();
if (actualToken == JsonToken.EndDocument)
{
Assert.False(true, $"Expected {expectedTokens[i]} but reached end of document");
Assert.Fail($"Expected {expectedTokens[i]} but reached end of document");
}
Assert.Equal(expectedTokens[i], actualToken);
}
Expand Down

0 comments on commit e74feaf

Please sign in to comment.