Skip to content

Commit

Permalink
nhibernateGH-3530: Correctly set test parameter type to CultureInfo i…
Browse files Browse the repository at this point in the history
…nstead of string.
  • Loading branch information
David Ellingsworth authored and David Ellingsworth committed May 15, 2024
1 parent c65a04e commit b45a004
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/NHibernate.Test/NHSpecificTest/GH3530/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ protected override void OnTearDown()
}
}

[TestCaseSource(nameof(GenerateAllLocaleCombinations))]
public void TestLocales(string from, string to)
[TestCaseSource(nameof(GenerateAllCultureCombinations))]
public void TestLocales(CultureInfo from, CultureInfo to)
{
DateTime leapDay = new DateTime(2024, 2, 29, new GregorianCalendar(GregorianCalendarTypes.USEnglish));
double doubleValue = 12.3f;
int intValue = 4;
object id;

CurrentCulture = CultureInfo.GetCultureInfo(from);
CurrentCulture = from;
using (var session = OpenSession())
using (var tx = session.BeginTransaction())
{
Expand All @@ -61,7 +61,7 @@ public void TestLocales(string from, string to)
tx.Commit();
}

CurrentCulture = CultureInfo.GetCultureInfo(to);
CurrentCulture = to;
using (var session = OpenSession())
using (var tx = session.BeginTransaction())
{
Expand All @@ -85,7 +85,7 @@ private CultureInfo CurrentCulture
}
}

public static IEnumerable<object> GenerateAllLocaleCombinations()
public static IEnumerable<object> GenerateAllCultureCombinations()
{
var cultures = CultureInfo.GetCultures(CultureTypes.AllCultures);

Expand Down

0 comments on commit b45a004

Please sign in to comment.