diff options
author | Artur Signell <artur@vaadin.com> | 2014-12-12 10:32:29 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2014-12-12 10:32:29 +0200 |
commit | 6fdc3320fec5801a73f51d3e3a3584d23d942c6c (patch) | |
tree | bca21a044acc56530bb403eb1cd3652c01c71928 /server/tests/src/com/vaadin/ui/RichTextAreaTest.java | |
parent | b3e6edc9634f444ccece00e200cb51eee7994d75 (diff) | |
parent | 10fa4e4236ed049ef6eac337d23701bc381763ce (diff) | |
download | vaadin-framework-6fdc3320fec5801a73f51d3e3a3584d23d942c6c.tar.gz vaadin-framework-6fdc3320fec5801a73f51d3e3a3584d23d942c6c.zip |
Merge remote-tracking branch 'origin/master' into grid
Conflicts:
server/tests/src/com/vaadin/data/util/BeanItemContainerTest.java
Change-Id: I04938bd8c5b4f01c3ca801c9f7adbb20d279523c
Diffstat (limited to 'server/tests/src/com/vaadin/ui/RichTextAreaTest.java')
-rw-r--r-- | server/tests/src/com/vaadin/ui/RichTextAreaTest.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/ui/RichTextAreaTest.java b/server/tests/src/com/vaadin/ui/RichTextAreaTest.java new file mode 100644 index 0000000000..ce0dfdc696 --- /dev/null +++ b/server/tests/src/com/vaadin/ui/RichTextAreaTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.ui; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.data.util.ObjectProperty; + +public class RichTextAreaTest { + @Test + public void initiallyEmpty() { + RichTextArea tf = new RichTextArea(); + Assert.assertTrue(tf.isEmpty()); + } + + @Test + public void emptyAfterClearUsingPDS() { + RichTextArea tf = new RichTextArea(new ObjectProperty<String>("foo")); + Assert.assertFalse(tf.isEmpty()); + tf.clear(); + Assert.assertTrue(tf.isEmpty()); + } + + @Test + public void emptyAfterClear() { + RichTextArea tf = new RichTextArea(); + tf.setValue("foobar"); + Assert.assertFalse(tf.isEmpty()); + tf.clear(); + Assert.assertTrue(tf.isEmpty()); + } + +} |