Esempio n. 1
0
        public void TestToString()
        {
            RuleBasedBreakIterator bi1 = (RuleBasedBreakIterator)BreakIterator.GetCharacterInstance(CultureInfo.CurrentCulture);
            RuleBasedBreakIterator bi2 = (RuleBasedBreakIterator)BreakIterator.GetWordInstance(CultureInfo.CurrentCulture);

            Logln("Testing toString()");
            bi1.SetText("Hello there");
            RuleBasedBreakIterator bi3 = (RuleBasedBreakIterator)bi1.Clone();
            String temp  = bi1.ToString();
            String temp2 = bi2.ToString();
            String temp3 = bi3.ToString();

            if (temp2.Equals(temp3) || temp.Equals(temp2) || !temp.Equals(temp3))
            {
                Errln("ERROR: error in toString() method");
            }
        }