Ejemplo n.º 1
0
 /*
  * Test method for 'java.awt.TextArea.replaceRange(String, int, int)'
  */
 public void testReplaceRange() {
   int start = 8;
   int end = 11;
   String text = "This is old text";
   area.setText(text);
   String str = "brand new";
   area.replaceRange(str, start, end);
   assertEquals("This is brand new text", area.getText());
   assertEquals("", area.getSelectedText());
   assertEquals(0, area.getRows());
   assertEquals(0, area.getCaretPosition());
 }
Ejemplo n.º 2
0
 private String getSelectedText() {
   return ta.getSelectedText();
 }