Skip to content

Commit b447994

Browse files
committed
take culture as argument
1 parent b28b24f commit b447994

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

test/WebJobs.Script.Tests/UtilityTests.cs

+11-10
Original file line numberDiff line numberDiff line change
@@ -356,18 +356,19 @@ public void IsHttporManualTriggerTests(string triggerType, bool expectedResult)
356356
}
357357

358358
[Theory]
359-
[InlineData("createIsolationEnvironment", true)]
360-
[InlineData("HttpTrigger2", true)]
361-
[InlineData("HttptRIGGER", true)]
362-
[InlineData("MANUALtRIGGER", true)]
363-
[InlineData("Function-200", true)]
364-
[InlineData("hello!", false)]
365-
[InlineData("🙅", false)]
366-
public void IsValidFunctionNameTests(string functionName, bool expectedResult)
359+
[InlineData("createIsolationEnvironment", "tr-TR", true)]
360+
[InlineData("HttpTrigger2", "en-US", true)]
361+
[InlineData("HttptRIGGER", "ja-JP", true)]
362+
[InlineData("Function-200", "ja-JP", true)]
363+
[InlineData("MaNUALtRIGGER", "es-ES", true)]
364+
[InlineData("MáNUALtRIGGER", "es-ES", false)]
365+
[InlineData("hello!", "en-US", false)]
366+
[InlineData("コード", "ja-JP", false)]
367+
[InlineData("🙅", "en-US", false)]
368+
public void IsValidFunctionNameTests(string functionName, string cultureInfo, bool expectedResult)
367369
{
368370
CultureInfo defaultCulture = Thread.CurrentThread.CurrentCulture;
369-
// In Turkish-Turkey, "I" is not the uppercase equivalent of "i"
370-
Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR");
371+
Thread.CurrentThread.CurrentCulture = new CultureInfo(cultureInfo);
371372
Assert.Equal(expectedResult, Utility.IsValidFunctionName(functionName));
372373
Thread.CurrentThread.CurrentCulture = defaultCulture;
373374
}

0 commit comments

Comments
 (0)