OSDN Git Service

xUnit.net 2.6.2 にアップデート
authorKimura Youichi <kim.upsilon@bucyou.net>
Wed, 6 Dec 2023 17:49:46 +0000 (02:49 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Wed, 6 Dec 2023 17:59:36 +0000 (02:59 +0900)
.github/workflows/test.yml
OpenTween.Tests/OpenTween.Tests.csproj
OpenTween.Tests/TestUtils.cs

index 3829b7f..ed50570 100644 (file)
@@ -49,10 +49,10 @@ jobs:
         shell: pwsh
         run: |
           $altCoverVersion = '8.6.61'
-          $xunitVersion = '2.4.2'
+          $xunitVersion = '2.6.2'
           $targetFramework = 'net48'
           $altCoverPath = "$($env:NUGET_PACKAGES)\altcover\$($altCoverVersion)\tools\net472\AltCover.exe"
-          $xunitPath = "$($env:NUGET_PACKAGES)\xunit.runner.console\$($xunitVersion)\tools\net472\xunit.console.exe"
+          $xunitPath = "$($env:NUGET_PACKAGES)\xunit.runner.console\$($xunitVersion)\tools\net481\xunit.console.exe"
 
           $p = Start-Process `
             -FilePath $altCoverPath `
index b358977..77ed422 100644 (file)
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
-    <PackageReference Include="xunit" Version="2.4.2" />
-    <PackageReference Include="xunit.runner.console" Version="2.4.2">
+    <PackageReference Include="xunit" Version="2.6.2" />
+    <PackageReference Include="xunit.runner.console" Version="2.6.2">
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
-    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
+    <PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
index e7fe87b..c1c4e88 100644 (file)
@@ -68,7 +68,7 @@ namespace OpenTween
                 await testCode().ConfigureAwait(false);
 
                 if (raisedEvent != null)
-                    throw new Xunit.Sdk.RaisesException(typeof(void), raisedEvent.GetType());
+                    throw Xunit.Sdk.RaisesException.ForIncorrectType(typeof(void), raisedEvent.GetType());
             }
             finally
             {
@@ -81,7 +81,7 @@ namespace OpenTween
             void Handler(object s, PropertyChangedEventArgs e)
             {
                 if (s == @object && e.PropertyName == propertyName)
-                    throw new Xunit.Sdk.PropertyChangedException(propertyName);
+                    throw Xunit.Sdk.PropertyChangedException.ForUnsetProperty(propertyName);
             }
 
             try