mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-31 13:59:43 +00:00
Added test for turkish FirstCharToUpper
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user