public void Setup() { SetupCore(); this.culture = CultureInfo.CurrentCulture; CultureInfo testCulture = new CultureInfo("en-US"); testCulture.DateTimeFormat.AMDesignator = "my_am"; testCulture.DateTimeFormat.PMDesignator = "my_pm"; testCulture.DateTimeFormat.DateSeparator = "my_dateseparator"; testCulture.DateTimeFormat.TimeSeparator = "my_timeseparator"; testCulture.DateTimeFormat.ShortTimePattern = "my_short_time"; testCulture.DateTimeFormat.LongTimePattern = "my_long_time"; testCulture.DateTimeFormat.ShortDatePattern = "my_short_date"; testCulture.DateTimeFormat.LongDatePattern = "my_long_date"; testCulture.DateTimeFormat.MonthDayPattern = "my_month_day"; testCulture.DateTimeFormat.YearMonthPattern = "my_year_month"; testCulture.DateTimeFormat.FullDateTimePattern = "my_full"; testCulture.DateTimeFormat.AbbreviatedMonthNames = new string[] { "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a", "s", "d" }; testCulture.DateTimeFormat.MonthNames = new string[] { "full_q", "full_w", "full_e", "full_r", "full_t", "full_y", "full_u", "full_i", "full_o", "full_p", "full_a", "full_s", "full_d" }; testCulture.DateTimeFormat.DayNames = new string[] { "z", "x", "c", "v", "b", "f", "g" }; testCulture.DateTimeFormat.ShortestDayNames = new string[] { "short_z", "short_x", "short_c", "short_v", "short_b", "short_f", "short_g" }; testCulture.NumberFormat.CurrencySymbol = "@"; testCulture.NumberFormat.PercentSymbol = "?"; Thread.CurrentThread.CurrentCulture = testCulture; Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); this.collector = new CurrentCultureCollector(); }
public void TearDown() { TearDownCore(); Thread.CurrentThread.CurrentCulture = culture; this.collector = null; }