-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
When using a specification containing a language dependent condition, my expected behavior is that the generated hash for the cache key should be the same in every culture.
var date = DateTime.Now;
var culture = new System.Globalization.CultureInfo("en");
System.Threading.Thread.CurrentThread.CurrentCulture = culture;
System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
var spec1 = new Specification<Contact>(p => p.Date >= date);
var hash1 = HashGenerator.FromSpecification(spec1);
culture = new System.Globalization.CultureInfo("it");
System.Threading.Thread.CurrentThread.CurrentCulture = culture;
System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
var spec2 = new Specification<Contact>(p => p.Date >= date);
var hash2 = HashGenerator.FromSpecification(spec2);
hash1.ShouldBe(hash2);I think that the current language should not affect the generated key.
giocaputo and wufe