public void Test_setLocaleLjava_util_Locale()
 {
     // Test for method void
     // java.text.IBM.ICU.Text.MessageFormat.setLocale(java.util.Locale)
     IBM.ICU.Text.MessageFormat format = new IBM.ICU.Text.MessageFormat("date {0,date}");
     format.SetLocale(ILOG.J2CsMapping.Util.Locale.CHINA);
     NUnit.Framework.Assert.AreEqual(ILOG.J2CsMapping.Util.Locale.CHINA, format.GetLocale(), "Wrong locale1");
     format.ApplyPattern("{1,date}");
     NUnit.Framework.Assert.AreEqual(IBM.ICU.Text.DateFormat.GetDateInstance(IBM.ICU.Text.DateFormat.DEFAULT, ILOG.J2CsMapping.Util.Locale.CHINA), format.GetFormats()[0], "Wrong locale3");
 }
        public void Test_ConstructorLjava_lang_StringLjava_util_Locale()
        {
            // Test for method java.text.MessageFormat(java.lang.String,
            // java.util.Locale)
            ILOG.J2CsMapping.Util.Locale mk     = new ILOG.J2CsMapping.Util.Locale("mk", "MK");
            IBM.ICU.Text.MessageFormat   format = new IBM.ICU.Text.MessageFormat(
                "Date: {0,date} Currency: {1, number, currency} Integer: {2, number, integer}",
                mk);

            NUnit.Framework.Assert.IsTrue(format.GetLocale().Equals(mk), "Wrong locale1");
            NUnit.Framework.Assert.IsTrue(format.GetFormats()[0].Equals(IBM.ICU.Text.DateFormat
                                                                        .GetDateInstance(IBM.ICU.Text.DateFormat.DEFAULT, mk)), "Wrong locale2");
            NUnit.Framework.Assert.IsTrue(format.GetFormats()[1].Equals(IBM.ICU.Text.NumberFormat
                                                                        .GetCurrencyInstance(mk)), "Wrong locale3");
            NUnit.Framework.Assert.IsTrue(format.GetFormats()[2].Equals(IBM.ICU.Text.NumberFormat
                                                                        .GetIntegerInstance(mk)), "Wrong locale4");
        }