Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using System.Data;
using System.Data.Common;
using System.Globalization;
using System.Reflection;
using System.Security;
using System.Threading;
Expand Down Expand Up @@ -250,6 +251,32 @@ public void ConnectionTestValidCredentialCombination()
Assert.Equal(sqlCredential, conn.Credential);
}

[Fact]
public void ConnectionTestWithCultureTH()
{
CultureInfo savedCulture = Thread.CurrentThread.CurrentCulture;
CultureInfo savedUICulture = Thread.CurrentThread.CurrentUICulture;

try
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("th-TH");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("th-TH");

using TestTdsServer server = TestTdsServer.StartTestServer();
using SqlConnection connection = new SqlConnection(server.ConnectionString);
connection.Open();
Assert.Equal(ConnectionState.Open, connection.State);
}
finally
{
// Restore saved cultures if necessary
if (Thread.CurrentThread.CurrentCulture != savedCulture)
Thread.CurrentThread.CurrentCulture = savedCulture;
if (Thread.CurrentThread.CurrentUICulture != savedUICulture)
Thread.CurrentThread.CurrentUICulture = savedUICulture;
}
}

[Fact]
public void ConnectionTestAccessTokenCallbackCombinations()
{
Expand Down