Example #1
0
        public void TestBug12519()
        {
            RuleBasedBreakIterator biEn = (RuleBasedBreakIterator)BreakIterator.GetWordInstance(ULocale.ENGLISH);
            RuleBasedBreakIterator biFr = (RuleBasedBreakIterator)BreakIterator.GetWordInstance(ULocale.FRANCE);

            assertEquals("", ULocale.ENGLISH, biEn.GetLocale(ULocale.VALID_LOCALE));
            assertEquals("", ULocale.FRENCH, biFr.GetLocale(ULocale.VALID_LOCALE));
            assertEquals("Locales do not participate in BreakIterator equality.", biEn, biFr);

            RuleBasedBreakIterator cloneEn = (RuleBasedBreakIterator)biEn.Clone();

            assertEquals("", biEn, cloneEn);
            assertEquals("", ULocale.ENGLISH, cloneEn.GetLocale(ULocale.VALID_LOCALE));

            RuleBasedBreakIterator cloneFr = (RuleBasedBreakIterator)biFr.Clone();

            assertEquals("", biFr, cloneFr);
            assertEquals("", ULocale.FRENCH, cloneFr.GetLocale(ULocale.VALID_LOCALE));
        }