public void TestGetFormat() { using (CultureSaver.SetCultures(enGb, FailingCultureInfo.Instance)) { var info = new NodaFormatInfo(enUs); Assert.AreSame(info, info.GetFormat(typeof(NodaFormatInfo))); var actualNfi = info.GetFormat(typeof(NumberFormatInfo)); Assert.AreSame(enUs.NumberFormat, actualNfi); Assert.AreNotSame(Thread.CurrentThread.CurrentCulture.NumberFormat, actualNfi); var actualDtfi = info.GetFormat(typeof(DateTimeFormatInfo)); Assert.AreSame(enUs.DateTimeFormat, actualDtfi); Assert.AreNotSame(Thread.CurrentThread.CurrentCulture.DateTimeFormat, actualDtfi); } }