public void UICultureIsChangedWithinTest(string uiCulture) { var originalUICulture = Thread.CurrentThread.CurrentUICulture; var attr = new UseCultureAttribute("ru-RU", uiCulture); attr.Before(null); Assert.Equal(attr.UICulture, Thread.CurrentThread.CurrentUICulture); attr.After(null); Assert.Equal(originalUICulture, Thread.CurrentThread.CurrentUICulture); }
public void CultureIsChangedWithinTest(string culture) { var originalCulture = Thread.CurrentThread.CurrentCulture; var attr = new UseCultureAttribute(culture); attr.Before(null); Assert.Equal(attr.Culture, Thread.CurrentThread.CurrentCulture); attr.After(null); Assert.Equal(originalCulture, Thread.CurrentThread.CurrentCulture); }
public void RefreshCachedCultureRelatedInformationWithinTest(string culture) { var originalCulture = Thread.CurrentThread.CurrentCulture; var attr = new UseCultureAttribute(culture); attr.Before(null); var ri = new RegionInfo(Thread.CurrentThread.CurrentCulture.LCID); Assert.Equal(attr.Culture, Thread.CurrentThread.CurrentCulture); Assert.Equal(ri.TwoLetterISORegionName, RegionInfo.CurrentRegion.TwoLetterISORegionName); attr.After(null); Assert.Equal(originalCulture, Thread.CurrentThread.CurrentCulture); }