You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RichTextAreaTest.java 801B

12345678910111213141516171819202122232425262728293031323334
  1. package com.vaadin.v7.ui;
  2. import static org.junit.Assert.assertFalse;
  3. import static org.junit.Assert.assertTrue;
  4. import org.junit.Test;
  5. import com.vaadin.v7.data.util.ObjectProperty;
  6. public class RichTextAreaTest {
  7. @Test
  8. public void initiallyEmpty() {
  9. RichTextArea tf = new RichTextArea();
  10. assertTrue(tf.isEmpty());
  11. }
  12. @Test
  13. public void emptyAfterClearUsingPDS() {
  14. RichTextArea tf = new RichTextArea(new ObjectProperty<String>("foo"));
  15. assertFalse(tf.isEmpty());
  16. tf.clear();
  17. assertTrue(tf.isEmpty());
  18. }
  19. @Test
  20. public void emptyAfterClear() {
  21. RichTextArea tf = new RichTextArea();
  22. tf.setValue("foobar");
  23. assertFalse(tf.isEmpty());
  24. tf.clear();
  25. assertTrue(tf.isEmpty());
  26. }
  27. }