1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00

Added test for turkish FirstCharToUpper

This commit is contained in:
Taloth Saldono 2019-06-15 20:59:20 +02:00
parent 3f67802e3d
commit c71b4bde86
3 changed files with 19 additions and 3 deletions

View File

@ -1,4 +1,5 @@
using FluentAssertions; using System.Globalization;
using FluentAssertions;
using NUnit.Framework; using NUnit.Framework;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
@ -16,5 +17,20 @@ public void should_capitalize_first_character(string input, string expected)
{ {
input.FirstCharToUpper().Should().Be(expected); input.FirstCharToUpper().Should().Be(expected);
} }
[Test]
public void should_capitalize_first_character_regardless_of_culture()
{
var current = CultureInfo.CurrentCulture;
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("tr-TR");
try
{
"infInite".FirstCharToUpper().Should().Be("InfInite");
}
finally
{
CultureInfo.CurrentCulture = current;
}
}
} }
} }

View File

@ -349,7 +349,7 @@
<Compile Include="OrganizerTests\FileNameBuilderTests\MultiEpisodeFixture.cs" /> <Compile Include="OrganizerTests\FileNameBuilderTests\MultiEpisodeFixture.cs" />
<Compile Include="OrganizerTests\FileNameBuilderTests\CleanTitleYearFixture.cs" /> <Compile Include="OrganizerTests\FileNameBuilderTests\CleanTitleYearFixture.cs" />
<Compile Include="OrganizerTests\FileNameBuilderTests\IdFixture.cs" /> <Compile Include="OrganizerTests\FileNameBuilderTests\IdFixture.cs" />
<Compile Include="OrganizerTests\FileNameBuilderTests\SeriesTitleFirstCharcterFixture.cs" /> <Compile Include="OrganizerTests\FileNameBuilderTests\SeriesTitleFirstCharacterFixture.cs" />
<Compile Include="OrganizerTests\FileNameBuilderTests\TitleYearFixture.cs" /> <Compile Include="OrganizerTests\FileNameBuilderTests\TitleYearFixture.cs" />
<Compile Include="OrganizerTests\FileNameBuilderTests\TitleTheYearFixture.cs" /> <Compile Include="OrganizerTests\FileNameBuilderTests\TitleTheYearFixture.cs" />
<Compile Include="OrganizerTests\FileNameBuilderTests\TitleTheFixture.cs" /> <Compile Include="OrganizerTests\FileNameBuilderTests\TitleTheFixture.cs" />

View File

@ -10,7 +10,7 @@
namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
{ {
[TestFixture] [TestFixture]
public class SeriesTitleFirstCharcterFixture : CoreTest<FileNameBuilder> public class SeriesTitleFirstCharacterFixture : CoreTest<FileNameBuilder>
{ {
private Series _series; private Series _series;
private NamingConfig _namingConfig; private NamingConfig _namingConfig;