From 2147c5269552b4882e4745faec683ec683a892d4 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Sat, 15 Jun 2019 20:59:20 +0200 Subject: [PATCH] Added test for turkish FirstCharToUpper --- .../FirstCharcacterToUpperFixture.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Common.Test/ExtensionTests/StringExtensionTests/FirstCharcacterToUpperFixture.cs b/src/NzbDrone.Common.Test/ExtensionTests/StringExtensionTests/FirstCharcacterToUpperFixture.cs index 53e221f4e..5013ddd73 100644 --- a/src/NzbDrone.Common.Test/ExtensionTests/StringExtensionTests/FirstCharcacterToUpperFixture.cs +++ b/src/NzbDrone.Common.Test/ExtensionTests/StringExtensionTests/FirstCharcacterToUpperFixture.cs @@ -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; + } + } } }