Exemple #1
0
 @Test
 public void testFindEndOfWord() {
   // prekrocenie
   assertEquals(4, TextUtils.findEndOfWord("aa", 4));
   // konci pismenom
   assertEquals(2, TextUtils.findEndOfWord("aa 2", 0));
   // konci cislom
   assertEquals(2, TextUtils.findEndOfWord("a2 2", 0));
 }
Exemple #2
0
 @Test
 public void testFindNextCharacterInLine() {
   int ns = TextUtils.findNextCharacterInLine(" 1234 56", 3);
   assertEquals("nasledujuci znak", 3, ns);
   ns = TextUtils.findNextCharacterInLine(" 12   34 56", 3);
   assertEquals("nasledujuci znak", 6, ns);
   ns = TextUtils.findNextCharacterInLine(" 12   34 56", 3);
   assertEquals("nasledujuci znak", 6, ns);
 }