diff options
Diffstat (limited to 'tests')
10 files changed, 16 insertions, 10 deletions
diff --git a/tests/Jellyfin.Extensions.Tests/AlphanumericComparatorTests.cs b/tests/Jellyfin.Extensions.Tests/AlphanumericComparatorTests.cs index 7730841a1..2a7e8fafd 100644 --- a/tests/Jellyfin.Extensions.Tests/AlphanumericComparatorTests.cs +++ b/tests/Jellyfin.Extensions.Tests/AlphanumericComparatorTests.cs @@ -23,7 +23,7 @@ namespace Jellyfin.Extensions.Tests { var copy = strings.Reverse().ToArray(); Array.Sort(copy, new AlphanumericComparator()); - Assert.True(strings.SequenceEqual(copy)); + Assert.Equal(strings, copy); } } } diff --git a/tests/Jellyfin.Extensions.Tests/Json/Converters/JsonLowerCaseConverterTests.cs b/tests/Jellyfin.Extensions.Tests/Json/Converters/JsonLowerCaseConverterTests.cs index af9227de2..16c69ca48 100644 --- a/tests/Jellyfin.Extensions.Tests/Json/Converters/JsonLowerCaseConverterTests.cs +++ b/tests/Jellyfin.Extensions.Tests/Json/Converters/JsonLowerCaseConverterTests.cs @@ -57,7 +57,7 @@ namespace Jellyfin.Extensions.Tests.Json.Converters Assert.Equal(json, res); } - private class TestContainer + private sealed class TestContainer { public TestContainer(CollectionTypeOptions? collectionType) { diff --git a/tests/Jellyfin.Extensions.Tests/StringExtensionsTests.cs b/tests/Jellyfin.Extensions.Tests/StringExtensionsTests.cs index 903d88caa..69d20bd3f 100644 --- a/tests/Jellyfin.Extensions.Tests/StringExtensionsTests.cs +++ b/tests/Jellyfin.Extensions.Tests/StringExtensionsTests.cs @@ -9,12 +9,15 @@ namespace Jellyfin.Extensions.Tests [InlineData("", "")] // Identity edge-case (no diactritics) [InlineData("Indiana Jones", "Indiana Jones")] // Identity (no diactritics) [InlineData("a\ud800b", "ab")] // Invalid UTF-16 char stripping + [InlineData("åäö", "aao")] // Issue #7484 [InlineData("Jön", "Jon")] // Issue #7484 [InlineData("Jönssonligan", "Jonssonligan")] // Issue #7484 [InlineData("Kieślowski", "Kieslowski")] // Issue #7450 [InlineData("Cidadão Kane", "Cidadao Kane")] // Issue #7560 [InlineData("운명처럼 널 사랑해", "운명처럼 널 사랑해")] // Issue #6393 (Korean language support) [InlineData("애타는 로맨스", "애타는 로맨스")] // Issue #6393 + [InlineData("Le cœur a ses raisons", "Le coeur a ses raisons")] // Issue #8893 + [InlineData("Béla Tarr", "Bela Tarr")] // Issue #8893 public void RemoveDiacritics_ValidInput_Corrects(string input, string expectedResult) { string result = input.RemoveDiacritics(); @@ -25,12 +28,15 @@ namespace Jellyfin.Extensions.Tests [InlineData("", false)] // Identity edge-case (no diactritics) [InlineData("Indiana Jones", false)] // Identity (no diactritics) [InlineData("a\ud800b", true)] // Invalid UTF-16 char stripping + [InlineData("åäö", true)] // Issue #7484 [InlineData("Jön", true)] // Issue #7484 [InlineData("Jönssonligan", true)] // Issue #7484 [InlineData("Kieślowski", true)] // Issue #7450 [InlineData("Cidadão Kane", true)] // Issue #7560 [InlineData("운명처럼 널 사랑해", false)] // Issue #6393 (Korean language support) [InlineData("애타는 로맨스", false)] // Issue #6393 + [InlineData("Le cœur a ses raisons", true)] // Issue #8893 + [InlineData("Béla Tarr", true)] // Issue #8893 public void HasDiacritics_ValidInput_Corrects(string input, bool expectedResult) { bool result = input.HasDiacritics(); diff --git a/tests/Jellyfin.MediaEncoding.Tests/EncoderValidatorTests.cs b/tests/Jellyfin.MediaEncoding.Tests/EncoderValidatorTests.cs index c0c363d3d..1b27e344b 100644 --- a/tests/Jellyfin.MediaEncoding.Tests/EncoderValidatorTests.cs +++ b/tests/Jellyfin.MediaEncoding.Tests/EncoderValidatorTests.cs @@ -32,7 +32,7 @@ namespace Jellyfin.MediaEncoding.Tests Assert.Equal(valid, _encoderValidator.ValidateVersionInternal(versionOutput)); } - private class GetFFmpegVersionTestData : TheoryData<string, Version?> + private sealed class GetFFmpegVersionTestData : TheoryData<string, Version?> { public GetFFmpegVersionTestData() { diff --git a/tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs b/tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs index a1ace8476..2a62ab74c 100644 --- a/tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs +++ b/tests/Jellyfin.Model.Tests/Entities/ProviderIdsExtensionsTests.cs @@ -186,7 +186,7 @@ namespace Jellyfin.Model.Tests.Entities Assert.Null(nullProvider.ProviderIds); } - private class ProviderIdsExtensionsTestsObject : IHasProviderIds + private sealed class ProviderIdsExtensionsTestsObject : IHasProviderIds { public static readonly ProviderIdsExtensionsTestsObject Empty = new ProviderIdsExtensionsTestsObject(); diff --git a/tests/Jellyfin.Server.Implementations.Tests/Data/SqliteItemRepositoryTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Data/SqliteItemRepositoryTests.cs index 4c7c56311..7d92e7b26 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Data/SqliteItemRepositoryTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/Data/SqliteItemRepositoryTests.cs @@ -282,7 +282,7 @@ namespace Jellyfin.Server.Implementations.Tests.Data Assert.Equal(expected, SqliteItemRepository.SerializeProviderIds(values)); } - private class ProviderIdsExtensionsTestsObject : IHasProviderIds + private sealed class ProviderIdsExtensionsTestsObject : IHasProviderIds { public Dictionary<string, string> ProviderIds { get; set; } = new Dictionary<string, string>(); } diff --git a/tests/Jellyfin.Server.Implementations.Tests/HttpServer/WebSocketConnectionTests.cs b/tests/Jellyfin.Server.Implementations.Tests/HttpServer/WebSocketConnectionTests.cs index ef8f7cd90..f01611819 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/HttpServer/WebSocketConnectionTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/HttpServer/WebSocketConnectionTests.cs @@ -48,7 +48,7 @@ namespace Jellyfin.Server.Implementations.Tests.HttpServer Assert.Throws<JsonException>(() => con.DeserializeWebSocketMessage(new ReadOnlySequence<byte>(bytes), out var bytesConsumed)); } - internal class BufferSegment : ReadOnlySequenceSegment<byte> + internal sealed class BufferSegment : ReadOnlySequenceSegment<byte> { public BufferSegment(Memory<byte> memory) { diff --git a/tests/Jellyfin.Server.Implementations.Tests/Library/EpisodeResolverTest.cs b/tests/Jellyfin.Server.Implementations.Tests/Library/EpisodeResolverTest.cs index c21871297..286ba0405 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Library/EpisodeResolverTest.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/Library/EpisodeResolverTest.cs @@ -60,7 +60,7 @@ namespace Jellyfin.Server.Implementations.Tests.Library Assert.NotNull(episodeResolver.Resolve(itemResolveArgs)); } - private class EpisodeResolverMock : EpisodeResolver + private sealed class EpisodeResolverMock : EpisodeResolver { public EpisodeResolverMock(ILogger<EpisodeResolver> logger, NamingOptions namingOptions) : base(logger, namingOptions) { diff --git a/tests/Jellyfin.Server.Implementations.Tests/Sorting/AiredEpisodeOrderComparerTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Sorting/AiredEpisodeOrderComparerTests.cs index 59d82678e..1dd49b2cf 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Sorting/AiredEpisodeOrderComparerTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/Sorting/AiredEpisodeOrderComparerTests.cs @@ -27,7 +27,7 @@ namespace Jellyfin.Server.Implementations.Tests.Sorting Assert.Equal(-expected, cmp.Compare(y, x)); } - private class EpisodeBadData : TheoryData<BaseItem?, BaseItem?> + private sealed class EpisodeBadData : TheoryData<BaseItem?, BaseItem?> { public EpisodeBadData() { @@ -36,7 +36,7 @@ namespace Jellyfin.Server.Implementations.Tests.Sorting } } - private class EpisodeTestData : TheoryData<BaseItem, BaseItem, int> + private sealed class EpisodeTestData : TheoryData<BaseItem, BaseItem, int> { public EpisodeTestData() { diff --git a/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs b/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs index 79c11a865..9eb0beda4 100644 --- a/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs +++ b/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs @@ -48,7 +48,7 @@ namespace Jellyfin.Server.Integration.Tests headers.Add(AuthHeaderName, DummyAuthHeader + $", Token={accessToken}"); } - private class AuthenticationResultDto + private sealed class AuthenticationResultDto { public string AccessToken { get; set; } = string.Empty; |
