Skip to content

Commit a0c7cea

Browse files
committed
fix(tests): restore VS discovery with MSTest v4 alignment
1 parent cfda5c7 commit a0c7cea

13 files changed

+49
-72
lines changed

.github/workflows/dotnet-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
run: dotnet build TTSTextNormalization.sln --configuration Release --no-restore
4343

4444
- name: Run Tests for .NET 10.0
45-
run: dotnet test TTSTextNormalization.Tests/TTSTextNormalization.Tests.csproj --configuration Release --framework net10.0 --no-build --report-trx --report-trx-filename test-results-net10.trx
45+
run: dotnet test TTSTextNormalization.Tests/TTSTextNormalization.Tests.csproj --configuration Release --framework net10.0 --no-build --logger "trx;LogFileName=test-results-net10.trx"
4646

4747
- name: Run Tests for .NET 9.0
48-
run: dotnet test TTSTextNormalization.Tests/TTSTextNormalization.Tests.csproj --configuration Release --framework net9.0 --no-build --report-trx --report-trx-filename test-results-net9.trx
48+
run: dotnet test TTSTextNormalization.Tests/TTSTextNormalization.Tests.csproj --configuration Release --framework net9.0 --no-build --logger "trx;LogFileName=test-results-net9.trx"
4949

5050
- name: Upload Test Results
5151
if: always()
@@ -95,4 +95,4 @@ jobs:
9595
Get-ChildItem "${{ env.NuGetDirectory }}" -Filter *.nupkg | ForEach-Object {
9696
Write-Host "Pushing $($_.FullName)..."
9797
dotnet nuget push $_.FullName --api-key "$env:NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate
98-
}
98+
}

TTSTextNormalization.Generator/TTSTextNormalization.EmojiDataGenerator.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313

1414
<ItemGroup>
1515
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
16-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" PrivateAssets="all" />
16+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" PrivateAssets="all" />
1717
</ItemGroup>
1818

1919
<ItemGroup Label="Package References">
20-
<PackageReference Include="System.Text.Json" Version="9.0.4" GeneratePathProperty="true" PrivateAssets="all" />
21-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.4" GeneratePathProperty="true" PrivateAssets="all" />
20+
<PackageReference Include="System.Text.Json" Version="10.0.3" GeneratePathProperty="true" PrivateAssets="all" />
21+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.3" GeneratePathProperty="true" PrivateAssets="all" />
2222
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" GeneratePathProperty="true" PrivateAssets="all" />
2323
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.3" GeneratePathProperty="true" PrivateAssets="all" />
24-
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.4" GeneratePathProperty="true" PrivateAssets="all" />
24+
<PackageReference Include="System.Text.Encodings.Web" Version="10.0.3" GeneratePathProperty="true" PrivateAssets="all" />
2525
<PackageReference Include="System.Buffers" Version="4.6.1" GeneratePathProperty="true" PrivateAssets="all" />
2626
<PackageReference Include="System.Memory" Version="4.6.3" GeneratePathProperty="true" PrivateAssets="all" />
2727
<PackageReference Include="System.Numerics.Vectors" Version="4.6.1" GeneratePathProperty="true" PrivateAssets="all" />
28-
<PackageReference Include="System.IO.Pipelines" Version="9.0.4" GeneratePathProperty="true" PrivateAssets="all" />
28+
<PackageReference Include="System.IO.Pipelines" Version="10.0.3" GeneratePathProperty="true" PrivateAssets="all" />
2929
</ItemGroup>
3030

3131
<PropertyGroup>

TTSTextNormalization.Tests/Rules/AbbreviationNormalizationRuleTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Collections.Frozen;
1+
using System.Collections.Frozen;
22
using Microsoft.Extensions.Options;
33
using TTSTextNormalization.Rules;
44

@@ -129,7 +129,7 @@ public void Apply_NullInput_ThrowsArgumentNullException()
129129
string? input = null;
130130

131131
// Act & Assert
132-
Assert.ThrowsException<ArgumentNullException>(() => _rule.Apply(input!));
132+
Assert.Throws<ArgumentNullException>(() => _rule.Apply(input!));
133133
}
134134

135135
[TestMethod]

TTSTextNormalization.Tests/Rules/BasicSanitizationRuleTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using TTSTextNormalization.Rules;
1+
using TTSTextNormalization.Rules;
22

33
namespace TTSTextNormalization.Tests.Rules;
44

@@ -80,6 +80,6 @@ public void Apply_NullInput_ThrowsArgumentNullException()
8080
// Arrange
8181
string? input = null;
8282
// Act & Assert
83-
Assert.ThrowsException<ArgumentNullException>(() => _rule.Apply(input!));
83+
Assert.Throws<ArgumentNullException>(() => _rule.Apply(input!));
8484
}
85-
}
85+
}

TTSTextNormalization.Tests/Rules/CurrencyNormalizationRuleTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using TTSTextNormalization.Rules;
1+
using TTSTextNormalization.Rules;
22

33
namespace TTSTextNormalization.Tests.Rules;
44

@@ -98,6 +98,6 @@ public void Apply_NullInput_ThrowsArgumentNullException()
9898
string? input = null;
9999

100100
// Act & Assert
101-
Assert.ThrowsException<ArgumentNullException>(() => _rule.Apply(input!));
101+
Assert.Throws<ArgumentNullException>(() => _rule.Apply(input!));
102102
}
103-
}
103+
}

TTSTextNormalization.Tests/Rules/EmojiNormalizationRuleTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Microsoft.Extensions.Options;
1+
using Microsoft.Extensions.Options;
22
using TTSTextNormalization.Rules;
33

44
namespace TTSTextNormalization.Tests.Rules;
@@ -52,7 +52,7 @@ public void Apply_KnownEmojis_ReplacesWithGeneratedName(string input, string exp
5252
public void Apply_NullInput_ThrowsArgumentNullException()
5353
{
5454
string? input = null;
55-
Assert.ThrowsException<ArgumentNullException>(() => _rule.Apply(input!));
55+
Assert.Throws<ArgumentNullException>(() => _rule.Apply(input!));
5656
}
5757

5858
[TestMethod]

TTSTextNormalization.Tests/Rules/ExcessivePunctuationRuleTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using TTSTextNormalization.Rules;
1+
using TTSTextNormalization.Rules;
22

33
namespace TTSTextNormalization.Tests.Rules;
44

@@ -59,6 +59,6 @@ public void Apply_NullInput_ThrowsArgumentNullException()
5959
// Arrange
6060
string? input = null;
6161
// Act & Assert
62-
Assert.ThrowsException<ArgumentNullException>(() => _rule.Apply(input!));
62+
Assert.Throws<ArgumentNullException>(() => _rule.Apply(input!));
6363
}
64-
}
64+
}

TTSTextNormalization.Tests/Rules/LetterRepetitionRuleTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using TTSTextNormalization.Rules;
1+
using TTSTextNormalization.Rules;
22

33
namespace TTSTextNormalization.Tests.Rules;
44

@@ -58,6 +58,6 @@ public void Apply_NullInput_ThrowsArgumentNullException()
5858
// Arrange
5959
string? input = null;
6060
// Act & Assert
61-
Assert.ThrowsException<ArgumentNullException>(() => _rule.Apply(input!));
61+
Assert.Throws<ArgumentNullException>(() => _rule.Apply(input!));
6262
}
63-
}
63+
}

TTSTextNormalization.Tests/Rules/NumberNormalizationRuleTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using TTSTextNormalization.Rules;
1+
using TTSTextNormalization.Rules;
22

33
namespace TTSTextNormalization.Tests.Rules;
44

@@ -97,6 +97,6 @@ public void Apply_NonStandaloneNumbers_NoChange(string input, string expected)
9797
public void Apply_NullInput_ThrowsArgumentNullException()
9898
{
9999
string? input = null;
100-
Assert.ThrowsException<ArgumentNullException>(() => _rule.Apply(input!));
100+
Assert.Throws<ArgumentNullException>(() => _rule.Apply(input!));
101101
}
102-
}
102+
}

TTSTextNormalization.Tests/Rules/UrlNormalizationRuleTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Microsoft.Extensions.Options;
1+
using Microsoft.Extensions.Options;
22
using TTSTextNormalization.Rules;
33

44
namespace TTSTextNormalization.Tests.Rules;
@@ -132,7 +132,7 @@ public void Apply_NullInput_ThrowsArgumentNullException()
132132
// Arrange
133133
string? input = null;
134134
// Act & Assert
135-
Assert.ThrowsException<ArgumentNullException>(() => _rule.Apply(input!));
135+
Assert.Throws<ArgumentNullException>(() => _rule.Apply(input!));
136136
}
137137

138138
[TestMethod]

0 commit comments

Comments
 (0)