public void GetMessageDefaultsToCurrentUICulture()
        {
            StaticMessageSource msgSource = new StaticMessageSource();
            msgSource.AddMessage("code", CultureInfo.CurrentUICulture, "{0}");
            Assert.AreEqual("my message", msgSource.GetMessage("code", "my message"), "message");

            try
            {
                msgSource.GetMessage("code", CultureInfo.CurrentCulture);
                Assert.Fail("message");
            }
            catch(NoSuchMessageException)
            {}
        }
        public void GetMessageDefaultsToCurrentUICulture()
        {
            StaticMessageSource msgSource = new StaticMessageSource();

            msgSource.AddMessage("code", CultureInfo.CurrentUICulture, "{0}");
            Assert.AreEqual("my message", msgSource.GetMessage("code", "my message"), "message");

            try
            {
                msgSource.GetMessage("code", CultureInfo.CurrentCulture);
                Assert.Fail("message");
            }
            catch (NoSuchMessageException)
            {}
        }
 public void GetMessageCode()
 {
     StaticMessageSource msgSource = new StaticMessageSource();
     msgSource.AddMessage("code", CultureInfo.CurrentUICulture, "{0} {1}");
     Assert.AreEqual("my message",
                     msgSource.GetMessage("code", CultureInfo.CurrentUICulture, new object[] {"my", "message"}),
                     "message");
 }
        public void GetMessageCode()
        {
            StaticMessageSource msgSource = new StaticMessageSource();

            msgSource.AddMessage("code", CultureInfo.CurrentUICulture, "{0} {1}");
            Assert.AreEqual("my message",
                            msgSource.GetMessage("code", CultureInfo.CurrentUICulture, new object[] { "my", "message" }),
                            "message");
        }