Added test for turkish FirstCharToUpper
This commit is contained in:
parent
3f67802e3d
commit
c71b4bde86
|
@ -1,4 +1,5 @@
|
|||
using FluentAssertions;
|
||||
using System.Globalization;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
|
@ -16,5 +17,20 @@ namespace NzbDrone.Common.Test.ExtensionTests.StringExtensionTests
|
|||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@
|
|||
<Compile Include="OrganizerTests\FileNameBuilderTests\MultiEpisodeFixture.cs" />
|
||||
<Compile Include="OrganizerTests\FileNameBuilderTests\CleanTitleYearFixture.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\TitleTheYearFixture.cs" />
|
||||
<Compile Include="OrganizerTests\FileNameBuilderTests\TitleTheFixture.cs" />
|
||||
|
|
|
@ -10,7 +10,7 @@ using NzbDrone.Core.Tv;
|
|||
namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class SeriesTitleFirstCharcterFixture : CoreTest<FileNameBuilder>
|
||||
public class SeriesTitleFirstCharacterFixture : CoreTest<FileNameBuilder>
|
||||
{
|
||||
private Series _series;
|
||||
private NamingConfig _namingConfig;
|
Loading…
Reference in New Issue