public void NullingDefaultCultureYieldsThreadsCultureForResolveCulture()
 {
     DefaultCultureResolver resolver = new DefaultCultureResolver();
     resolver.DefaultCulture = CultureInfo.InvariantCulture;
     Assert.AreEqual(CultureInfo.InvariantCulture, resolver.ResolveCulture(),
                     "Not returning the DefaultCulture (it must if the DefaultCulture " +
                         "property has been set explicitly).");
     resolver.DefaultCulture = null;
     Assert.AreEqual(Thread.CurrentThread.CurrentUICulture, resolver.ResolveCulture(),
                     "Not falling back to the culture of the current thread after " +
                         "DefaultCulture property is nulled out (it must).");
 }
        public void NullingDefaultCultureYieldsThreadsCultureForResolveCulture()
        {
            DefaultCultureResolver resolver = new DefaultCultureResolver();

            resolver.DefaultCulture = CultureInfo.InvariantCulture;
            Assert.AreEqual(CultureInfo.InvariantCulture, resolver.ResolveCulture(),
                            "Not returning the DefaultCulture (it must if the DefaultCulture " +
                            "property has been set explicitly).");
            resolver.DefaultCulture = null;
            Assert.AreEqual(Thread.CurrentThread.CurrentUICulture, resolver.ResolveCulture(),
                            "Not falling back to the culture of the current thread after " +
                            "DefaultCulture property is nulled out (it must).");
        }
        public void ResolveCultureYieldsThreadsCultureAfterInitialization()
        {
            DefaultCultureResolver resolver = new DefaultCultureResolver();

            Assert.AreEqual(Thread.CurrentThread.CurrentUICulture, resolver.ResolveCulture(),
                            "Not defaulting to the culture of the current thread.");
        }
 public void DefaultCultureIsYieldedForResolveCulture()
 {
     DefaultCultureResolver resolver = new DefaultCultureResolver();
     resolver.DefaultCulture = CultureInfo.InvariantCulture;
     Assert.AreEqual(CultureInfo.InvariantCulture, resolver.ResolveCulture(),
                     "Not returning the DefaultCulture (it must if the DefaultCulture " +
                         "property has been set explicitly).");
 }
        public void DefaultCultureIsYieldedForResolveCulture()
        {
            DefaultCultureResolver resolver = new DefaultCultureResolver();

            resolver.DefaultCulture = CultureInfo.InvariantCulture;
            Assert.AreEqual(CultureInfo.InvariantCulture, resolver.ResolveCulture(),
                            "Not returning the DefaultCulture (it must if the DefaultCulture " +
                            "property has been set explicitly).");
        }
 public void ResolveCultureYieldsThreadsCultureAfterInitialization()
 {
     DefaultCultureResolver resolver = new DefaultCultureResolver();
     Assert.AreEqual(Thread.CurrentThread.CurrentUICulture, resolver.ResolveCulture(),
                     "Not defaulting to the culture of the current thread.");
 }