summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-12-14 21:34:01 +0200
committerMatti Hosio <mhosio@vaadin.com>2014-12-15 14:29:25 +0200
commit3b75f2b14833f78c00d0032cbd76b09fca058100 (patch)
treed229d3ccc47bc41ab0f9647601c755b08393426c /server/tests
parent5d5e8c4c05b9ab765cebcae10f96144c2f570681 (diff)
downloadvaadin-framework-3b75f2b14833f78c00d0032cbd76b09fca058100.tar.gz
vaadin-framework-3b75f2b14833f78c00d0032cbd76b09fca058100.zip
SynchronizeFrom/ToDesign -> read/writeDesign (#7749)
Change-Id: Ie5e420ac5d62a2aa3206051888e6dd0f8f30df11
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestSynchronizeFromDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestSynchronizeToDesign.java)8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestSynchronizeFromDesign.java)50
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestSynchronizeToDesign.java)42
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/TestSynchronizeFromDesign.java)8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractfield/TestSynchronizeToDesign.java)6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestSynchronizeFromDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestSynchronizeToDesign.java)20
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestSynchronizeFromDesign.java)14
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestSynchronizeToDesign.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestSynchronizeFromDesign.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestSynchronizeToDesign.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/button/TestSynchronizeFromDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/button/TestSynchronizeToDesign.java)8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/csslayout/TestSynchronizeFromDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/csslayout/TestSynchronizeToDesign.java)6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/label/TestSynchronizeFromDesign.java)2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/label/TestSynchronizeToDesign.java)10
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/panel/TestSynchronizeFromDesign.java)8
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/panel/TestSynchronizeToDesign.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/tabsheet/TestSynchronizeFromDesign.java)7
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/tabsheet/TestSynchronizeToDesign.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/textarea/TestSynchronizeFromDesign.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/textarea/TestSynchronizeToDesign.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/textfield/TestSynchronizeFromDesign.java)4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java (renamed from server/tests/src/com/vaadin/tests/server/component/textfield/TestSynchronizeToDesign.java)4
26 files changed, 116 insertions, 117 deletions
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java
index ce054007a6..5f9674e554 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java
@@ -35,7 +35,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private AbsoluteLayout root;
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java
index eb61d13684..5f42b1fa81 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestWriteDesign.java
@@ -31,13 +31,13 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
public void testSynchronizeEmptyLayout() {
AbsoluteLayout layout = createTestLayout();
layout.removeAllComponents();
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertEquals(0, design.childNodes().size());
assertEquals("changed-caption", design.attr("caption"));
}
@@ -45,7 +45,7 @@ public class TestSynchronizeToDesign extends TestCase {
public void testSynchronizeLayoutWithChildren() {
AbsoluteLayout layout = createTestLayout();
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertEquals(2, design.childNodes().size());
assertEquals("v-label", ((Element) design.childNode(0)).tagName());
assertEquals("v-label", ((Element) design.childNode(1)).tagName());
@@ -54,7 +54,7 @@ public class TestSynchronizeToDesign extends TestCase {
public void testSynchronizePosition() {
AbsoluteLayout layout = createTestLayout();
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
Attributes attributes = design.childNode(0).attributes();
assertEquals("50px", attributes.get(":top"));
assertEquals("50%", attributes.get(":left"));
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java
index df6fb47bf2..760f1ca422 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java
@@ -36,7 +36,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private DesignContext ctx;
@@ -49,28 +49,28 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeId() {
Element design = createDesign("id", "testId");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("testId", component.getId());
}
public void testSynchronizePrimaryStyleName() {
Element design = createDesign("primary-style-name", "test-style");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("test-style", component.getPrimaryStyleName());
}
public void testSynchronizeCaption() {
Element design = createDesign("caption", "test-caption");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("test-caption", component.getCaption());
}
public void testSynchronizeLocale() {
Element design = createDesign("locale", "fi_FI");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("fi", component.getLocale().getLanguage());
assertEquals("FI", component.getLocale().getCountry());
}
@@ -78,7 +78,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeExternalIcon() {
Element design = createDesign("icon", "http://example.com/example.gif");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertTrue("Incorrect resource type returned", component.getIcon()
.getClass().isAssignableFrom(ExternalResource.class));
assertEquals("http://example.com/example.gif",
@@ -88,7 +88,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeThemeIcon() {
Element design = createDesign("icon", "theme://example.gif");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertTrue("Incorrect resource type returned", component.getIcon()
.getClass().isAssignableFrom(ThemeResource.class));
}
@@ -96,7 +96,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeFileResource() {
Element design = createDesign("icon", "img/example.gif");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertTrue("Incorrect resource type returned", component.getIcon()
.getClass().isAssignableFrom(FileResource.class));
}
@@ -104,24 +104,24 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeImmediate() {
Element design = createDesign("immediate", "true");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(true, component.isImmediate());
assertEquals(Boolean.TRUE, getExplicitImmediate(component));
// Synchronize with a design having no immediate attribute -
// explicitImmediate should then be null.
design = createDesign("description", "test-description");
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(null, getExplicitImmediate(component));
// Synchronize with a design having immediate = false
design = createDesign("immediate", "false");
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(false, component.isImmediate());
assertEquals(Boolean.FALSE, getExplicitImmediate(component));
// Synchronize with a design having immediate = "" - should correspond
// to
// true.
design = createDesign("immediate", "");
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(true, component.isImmediate());
assertEquals(Boolean.TRUE, getExplicitImmediate(component));
}
@@ -129,14 +129,14 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeDescription() {
Element design = createDesign("description", "test-description");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("test-description", component.getDescription());
}
public void testSynchronizeComponentError() {
Element design = createDesign("error", "<div>test-error</div>");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("<div>test-error</div>", component.getComponentError()
.getFormattedHtmlMessage());
}
@@ -144,7 +144,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeSizeFull() {
Element design = createDesign("size-full", "");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(100, component.getWidth(), 0.1f);
assertEquals(100, component.getHeight(), 0.1f);
}
@@ -152,7 +152,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeSizeAuto() {
Element design = createDesign("size-auto", "");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(-1, component.getWidth(), 0.1f);
assertEquals(-1, component.getHeight(), 0.1f);
}
@@ -160,35 +160,35 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeHeightFull() {
Element design = createDesign("height-full", "");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(100, component.getHeight(), 0.1f);
}
public void testSynchronizeHeightAuto() {
Element design = createDesign("height-auto", "");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(-1, component.getHeight(), 0.1f);
}
public void testSynchronizeWidthFull() {
Element design = createDesign("width-full", "");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(100, component.getWidth(), 0.1f);
}
public void testSynchronizeWidthAuto() {
Element design = createDesign("width-auto", "");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(-1, component.getWidth(), 0.1f);
}
public void testSynchronizeWidth() {
Element design = createDesign("width", "12px");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(12, component.getWidth(), 0.1f);
assertEquals(com.vaadin.server.Sizeable.Unit.PIXELS,
component.getWidthUnits());
@@ -197,7 +197,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeHeight() {
Element design = createDesign("height", "12px");
AbstractComponent component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(12, component.getHeight(), 0.1f);
assertEquals(com.vaadin.server.Sizeable.Unit.PIXELS,
component.getHeightUnits());
@@ -207,7 +207,7 @@ public class TestSynchronizeFromDesign extends TestCase {
AbstractComponent component = getComponent();
Responsive.makeResponsive(component);
Element design = createDesign("responsive", "false");
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("Component should not have extensions", 0, component
.getExtensions().size());
}
@@ -215,7 +215,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeResponsive() {
AbstractComponent component = getComponent();
Element design = createDesign("responsive", "");
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("Component should have one extension", 1, component
.getExtensions().size());
assertTrue("Extension should be responsive", component.getExtensions()
@@ -226,7 +226,7 @@ public class TestSynchronizeFromDesign extends TestCase {
AbstractComponent component = getComponent();
Responsive.makeResponsive(component);
Element design = createDesign("responsive", "");
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("Component should have only one extension", 1, component
.getExtensions().size());
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java
index 349598ec8f..44c0e0b063 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestWriteDesign.java
@@ -41,7 +41,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private DesignContext ctx;
@@ -55,7 +55,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
component.setId("testId");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("testId", design.attr("id"));
@@ -65,7 +65,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
component.setPrimaryStyleName("test-style");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("test-style", design.attr("primary-style-name"));
@@ -75,7 +75,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
component.setCaption("test-caption");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// We only changed the caption, which is not
// an attribute.
assertEquals(0, design.attributes().size());
@@ -86,7 +86,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
component.setLocale(new Locale("fi", "FI"));
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("fi_FI", design.attr("locale"));
@@ -97,7 +97,7 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getComponent();
component
.setIcon(new ExternalResource("http://example.com/example.gif"));
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("http://example.com/example.gif", design.attr("icon"));
@@ -107,7 +107,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
component.setIcon(new ThemeResource("example.gif"));
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("theme://example.gif", design.attr("icon"));
@@ -117,7 +117,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
component.setIcon(new FileResource(new File("img/example.gif")));
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("img/example.gif", design.attr("icon"));
@@ -128,10 +128,10 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getComponent();
// no immediate attribute should be written before setting immediate to
// some value
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertFalse(design.hasAttr("immediate"));
component.setImmediate(true);
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("true", design.attr("immediate"));
@@ -141,7 +141,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
component.setDescription("test-description");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("test-description", design.attr("description"));
@@ -152,7 +152,7 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getComponent();
component.setComponentError(new UserError("<div>test-error</div>",
ContentMode.HTML, ErrorLevel.ERROR));
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertEquals("<div>test-error</div>", design.attr("error"));
@@ -162,7 +162,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
component.setSizeFull();
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// there should be only size full
assertEquals(1, design.attributes().size());
assertEquals("true", design.attr("size-full"));
@@ -172,7 +172,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getPanel();
component.setSizeUndefined();
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// there should be only size auto
assertEquals(1, design.attributes().size());
assertEquals("true", design.attr("size-auto"));
@@ -183,7 +183,7 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getComponent();
component.setHeight("100%");
component.setWidth("20px");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("true", design.attr("height-full"));
}
@@ -193,7 +193,7 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getPanel();
component.setHeight(null);
component.setWidth("20px");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("true", design.attr("height-auto"));
}
@@ -202,7 +202,7 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getComponent();
component.setHeight("20px");
component.setWidth("100%");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("true", design.attr("width-full"));
}
@@ -212,7 +212,7 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getPanel();
component.setHeight("20px");
component.setWidth(null);
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("true", design.attr("width-auto"));
}
@@ -221,7 +221,7 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getComponent();
component.setHeight("20px");
component.setWidth("70%");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("70%", design.attr("width"));
}
@@ -230,7 +230,7 @@ public class TestSynchronizeToDesign extends TestCase {
AbstractComponent component = getComponent();
component.setHeight("20px");
component.setWidth("70%");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("20px", design.attr("height"));
}
@@ -238,7 +238,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractComponent component = getComponent();
Responsive.makeResponsive(component);
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertTrue("Design attributes should have key 'responsive'", design
.attributes().hasKey("responsive"));
assertFalse("Responsive attribute should not be 'false'",
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java
index 6a2c194978..dd0e629199 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestReadDesign.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private DesignContext ctx;
@@ -44,17 +44,17 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSynchronizeReadOnly() {
Element design = createDesign("readonly", "");
AbstractField component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(true, component.isReadOnly());
design = createDesign("readonly", "false");
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals(false, component.isReadOnly());
}
public void testSynchronizeTabIndex() {
Element design = createDesign("tabindex", "2");
AbstractField component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("Tab index must be 2", 2, component.getTabIndex());
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java
index 26f64f9199..969713abe6 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/TestWriteDesign.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private DesignContext ctx;
@@ -45,7 +45,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractField component = getComponent();
component.setReadOnly(true);
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// we only changed one of the attributes, others are at default values
assertEquals(1, design.attributes().size());
assertTrue("Design must contain readonly", design.hasAttr("readonly"));
@@ -59,7 +59,7 @@ public class TestSynchronizeToDesign extends TestCase {
ObjectProperty property = new ObjectProperty<String>("test");
property.setReadOnly(true);
component.setPropertyDataSource(property);
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
// make sure that property readonly is not written to design
assertFalse("Design must not contain readonly",
design.hasAttr("readonly"));
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java
index 2b3d4cbdac..f52a04496a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
public void testChildCount() {
VerticalLayout root = createLayout(0f, false);
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java
index 23cf15cd13..302cf985bd 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestWriteDesign.java
@@ -32,13 +32,13 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
public void testSynchronizeMargin() {
VerticalLayout layout = new VerticalLayout();
layout.setMargin(true);
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertTrue("The margin must be written", design.hasAttr("margin"));
assertTrue("The margin must be empty or true", design.attr("margin")
.equals("") || design.attr("margin").equalsIgnoreCase("true"));
@@ -48,7 +48,7 @@ public class TestSynchronizeToDesign extends TestCase {
VerticalLayout layout = new VerticalLayout();
layout.setCaption("changed-caption");
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertEquals(0, design.childNodes().size());
assertEquals("changed-caption", design.attr("caption"));
}
@@ -59,7 +59,7 @@ public class TestSynchronizeToDesign extends TestCase {
layout.getComponent(0).setCaption("test-caption");
layout.addComponent(new Label("test-label-2"));
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertEquals(2, design.childNodes().size());
assertEquals("v-label", ((Element) design.childNode(0)).tagName());
assertEquals("test-caption", design.childNode(0).attr("caption"));
@@ -70,7 +70,7 @@ public class TestSynchronizeToDesign extends TestCase {
layout.addComponent(new Label("test-label"));
layout.setExpandRatio(layout.getComponent(0), 1.0f);
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertTrue(design.childNode(0).hasAttr(":expand"));
assertEquals("", design.childNode(0).attr(":expand"));
}
@@ -80,7 +80,7 @@ public class TestSynchronizeToDesign extends TestCase {
layout.addComponent(new Label("test-label"));
layout.setExpandRatio(layout.getComponent(0), 2.40f);
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertTrue(design.childNode(0).hasAttr(":expand"));
assertEquals("2.4", design.childNode(0).attr(":expand"));
}
@@ -88,7 +88,7 @@ public class TestSynchronizeToDesign extends TestCase {
public void testSynchronizeDefaultAlignment() {
Element design = createDesign();
VerticalLayout layout = createLayoutWithAlignment(design, null);
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertFalse(design.childNode(0).hasAttr(":top"));
assertFalse(design.childNode(0).hasAttr(":left"));
}
@@ -97,7 +97,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
VerticalLayout layout = createLayoutWithAlignment(design,
Alignment.MIDDLE_CENTER);
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertTrue(design.childNode(0).hasAttr(":middle"));
assertTrue(design.childNode(0).hasAttr(":center"));
}
@@ -106,7 +106,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
VerticalLayout layout = createLayoutWithAlignment(design,
Alignment.BOTTOM_RIGHT);
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertTrue(design.childNode(0).hasAttr(":bottom"));
assertTrue(design.childNode(0).hasAttr(":right"));
}
@@ -118,7 +118,7 @@ public class TestSynchronizeToDesign extends TestCase {
if (alignment != null) {
layout.setComponentAlignment(layout.getComponent(0), alignment);
}
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
return layout;
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java
index b34e8fc3f0..c57f18cbf9 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestReadDesign.java
@@ -38,7 +38,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
DesignContext ctx;
@Override
@@ -50,7 +50,7 @@ public class TestSynchronizeFromDesign extends TestCase {
// Create a design with non-default attributes values.
Element design = createDesign(true, false, true, true);
HorizontalSplitPanel sp = new HorizontalSplitPanel();
- sp.synchronizeFromDesign(design, ctx);
+ sp.readDesign(design, ctx);
// Check that the attributes are correctly parsed.
assertEquals(20.5f, sp.getSplitPosition());
assertEquals(Unit.PERCENTAGE, sp.getSplitPositionUnit());
@@ -63,7 +63,7 @@ public class TestSynchronizeFromDesign extends TestCase {
// check that the properties get the default values if the design
// does not have attributes corresponding to those properties
design = createDesign(true, true, true, true);
- sp.synchronizeFromDesign(design, ctx);
+ sp.readDesign(design, ctx);
HorizontalSplitPanel def = new HorizontalSplitPanel();
assertEquals(def.getSplitPosition(), sp.getSplitPosition());
assertEquals(def.getSplitPositionUnit(), sp.getSplitPositionUnit());
@@ -80,7 +80,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testWithNoChildren() {
Element design = createDesign(true, false, false, false);
HorizontalSplitPanel sp = new HorizontalSplitPanel();
- sp.synchronizeFromDesign(design, ctx);
+ sp.readDesign(design, ctx);
assertEquals("Unexpected child count for the split panel.", 0,
sp.getComponentCount());
}
@@ -88,7 +88,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testWithFirstChild() {
Element design = createDesign(false, false, true, false);
VerticalSplitPanel sp = new VerticalSplitPanel();
- sp.synchronizeFromDesign(design, ctx);
+ sp.readDesign(design, ctx);
assertEquals("Unexpected child count for the split panel.", 1,
sp.getComponentCount());
Object obj = sp.getFirstComponent();
@@ -99,7 +99,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testWithSecondChild() {
Element design = createDesign(true, false, false, true);
HorizontalSplitPanel sp = new HorizontalSplitPanel();
- sp.synchronizeFromDesign(design, ctx);
+ sp.readDesign(design, ctx);
assertEquals("Unexpected child count for the split panel.", 1,
sp.getComponentCount());
Object obj = sp.getSecondComponent();
@@ -110,7 +110,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testWithBothChildren() {
Element design = createDesign(false, false, true, true);
VerticalSplitPanel sp = new VerticalSplitPanel();
- sp.synchronizeFromDesign(design, ctx);
+ sp.readDesign(design, ctx);
assertEquals("Unexpected child count for the split panel.", 2,
sp.getComponentCount());
Object first = sp.getFirstComponent();
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java
index 3e342a0c89..1027414c2d 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractsplitpanel/TestWriteDesign.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private DesignContext ctx;
@Override
@@ -142,7 +142,7 @@ public class TestSynchronizeToDesign extends TestCase {
sp.setSecondComponent(new Label("Second slot"));
Element e = ctx.createNode(sp);
sp = new VerticalSplitPanel();
- sp.synchronizeToDesign(e, ctx);
+ sp.writeDesign(e, ctx);
assertTrue("There should be no attributes in the node.", e.attributes()
.size() == 0);
assertTrue("There should be no child elements.",
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java
index f7ba67f506..3b4b6f1f03 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestReadDesign.java
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Test case for reading the attributes of the AbstractTextField from design
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private DesignContext ctx;
@@ -42,7 +42,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testAttributes() {
Element design = createDesign();
AbstractTextField component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("this-is-null", component.getNullRepresentation());
assertEquals(true, component.isNullSettingAllowed());
assertEquals(5, component.getMaxLength());
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java
index b8f29b0ac9..be5c384d3b 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstracttextfield/TestWriteDesign.java
@@ -31,7 +31,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private DesignContext ctx;
@@ -51,7 +51,7 @@ public class TestSynchronizeToDesign extends TestCase {
component.setInputPrompt("input");
component.setTextChangeEventMode(TextChangeEventMode.EAGER);
component.setTextChangeTimeout(100);
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("this-is-null", design.attr("null-representation"));
assertEquals("true", design.attr("null-setting-allowed"));
assertEquals("5", design.attr("maxlength"));
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java
index 704192fb04..48b228a35a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/button/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java
@@ -37,7 +37,7 @@ import com.vaadin.ui.declarative.DesignContext;
* design.
*
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java
index c96fd36d5d..a8cf83522c 100644
--- a/server/tests/src/com/vaadin/tests/server/component/button/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/button/TestWriteDesign.java
@@ -32,7 +32,7 @@ import com.vaadin.ui.declarative.DesignContext;
* Tests generating html tree nodes corresponding to the contents of a Button
* and a NativeButton.
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private DesignContext ctx;
@@ -59,7 +59,7 @@ public class TestSynchronizeToDesign extends TestCase {
button.setIconAlternateText("OK");
button.setClickShortcut(KeyCode.O, ModifierKey.CTRL, ModifierKey.SHIFT);
Element e = new Element(Tag.valueOf("v-button"), "", new Attributes());
- button.synchronizeToDesign(e, ctx);
+ button.writeDesign(e, ctx);
assertEquals("3", e.attr("tabindex"));
assertTrue("Button is plain text by default", e.hasAttr("plain-text"));
assertEquals("OK", e.attr("icon-alt"));
@@ -70,11 +70,11 @@ public class TestSynchronizeToDesign extends TestCase {
public void testUpdateContentMode() {
Button button = new Button("OK");
Element e = new Element(Tag.valueOf("v-button"), "", new Attributes());
- button.synchronizeToDesign(e, ctx);
+ button.writeDesign(e, ctx);
assertTrue("Button is plain text by default", e.hasAttr("plain-text"));
button.setHtmlContentAllowed(true);
- button.synchronizeToDesign(e, ctx);
+ button.writeDesign(e, ctx);
assertTrue("Button is updated to HTML", !e.hasAttr("plain-text"));
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java
index e9694f0170..51f763bf14 100644
--- a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
public void testChildCount() {
CssLayout root = createLayout();
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java
index 2dfd560c8c..d660eb77ec 100644
--- a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestWriteDesign.java
@@ -30,13 +30,13 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
public void testSynchronizeEmptyLayout() {
CssLayout layout = new CssLayout();
layout.setCaption("changed-caption");
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertEquals(0, design.childNodes().size());
assertEquals("changed-caption", design.attr("caption"));
}
@@ -47,7 +47,7 @@ public class TestSynchronizeToDesign extends TestCase {
layout.getComponent(0).setCaption("test-caption");
layout.addComponent(new Label("test-label-2"));
Element design = createDesign();
- layout.synchronizeToDesign(design, createDesignContext());
+ layout.writeDesign(design, createDesignContext());
assertEquals(2, design.childNodes().size());
assertEquals("v-label", ((Element) design.childNode(0)).tagName());
assertEquals("test-caption", design.childNode(0).attr("caption"));
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java
index 168c44cb90..1a02ed98cc 100644
--- a/server/tests/src/com/vaadin/tests/server/component/label/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
* Test case for reading the contents of a Label from a design.
*
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private DesignContext ctx;
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java
index 869546ac3d..fab7c1d8eb 100644
--- a/server/tests/src/com/vaadin/tests/server/component/label/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/label/TestWriteDesign.java
@@ -29,7 +29,7 @@ import com.vaadin.ui.declarative.DesignContext;
/**
* Tests generating an html tree node corresponding to a Label.
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private DesignContext ctx;
@@ -63,7 +63,7 @@ public class TestSynchronizeToDesign extends TestCase {
public void testContentModeText() {
Label l = new Label("plain text label");
Element e = new Element(Tag.valueOf("v-label"), "", new Attributes());
- l.synchronizeToDesign(e, ctx);
+ l.writeDesign(e, ctx);
assertTrue("Label should be marked as plain text",
e.hasAttr("plain-text"));
}
@@ -74,7 +74,7 @@ public class TestSynchronizeToDesign extends TestCase {
l.setContentMode(ContentMode.HTML);
Element e = new Element(Tag.valueOf("v-label"), "", new Attributes());
- l.synchronizeToDesign(e, ctx);
+ l.writeDesign(e, ctx);
assertFalse("Label should not be marked as plain text",
e.hasAttr("plain-text"));
}
@@ -85,12 +85,12 @@ public class TestSynchronizeToDesign extends TestCase {
l.setContentMode(ContentMode.HTML);
Element e = new Element(Tag.valueOf("v-label"), "", new Attributes());
- l.synchronizeToDesign(e, ctx);
+ l.writeDesign(e, ctx);
assertFalse("Label should not be marked as plain text",
e.hasAttr("plain-text"));
l.setContentMode(ContentMode.TEXT);
- l.synchronizeToDesign(e, ctx);
+ l.writeDesign(e, ctx);
assertTrue("Label should be marked as plain text",
e.hasAttr("plain-text"));
diff --git a/server/tests/src/com/vaadin/tests/server/component/panel/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java
index bc4a597a4e..3eb52309a8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/panel/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/panel/TestReadDesign.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignException;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
DesignContext ctx;
@Override
@@ -41,7 +41,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testAttributes() {
Element design = createDesign();
Panel panel = new Panel();
- panel.synchronizeFromDesign(design, ctx);
+ panel.readDesign(design, ctx);
assertEquals("A panel", panel.getCaption());
assertEquals(2, panel.getTabIndex());
assertEquals(10, panel.getScrollLeft());
@@ -53,7 +53,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testChild() {
Element design = createDesign();
Panel panel = new Panel();
- panel.synchronizeFromDesign(design, ctx);
+ panel.readDesign(design, ctx);
VerticalLayout vLayout = (VerticalLayout) panel.getContent();
assertEquals(300f, vLayout.getWidth());
assertEquals(400f, vLayout.getHeight());
@@ -67,7 +67,7 @@ public class TestSynchronizeFromDesign extends TestCase {
design.appendChild(newChild);
Panel panel = new Panel();
try {
- panel.synchronizeFromDesign(design, ctx);
+ panel.readDesign(design, ctx);
fail("Parsing a design containing a Panel with more than one child component should have failed.");
} catch (DesignException e) {
// Nothing needs to be done, this is the expected case.
diff --git a/server/tests/src/com/vaadin/tests/server/component/panel/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java
index 56ff155612..f81193d511 100644
--- a/server/tests/src/com/vaadin/tests/server/component/panel/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/panel/TestWriteDesign.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
Element panelElement;
@Override
@@ -47,7 +47,7 @@ public class TestSynchronizeToDesign extends TestCase {
// synchronize to design
DesignContext ctx = new DesignContext();
panelElement = new Element(Tag.valueOf("div"), "");
- panel.synchronizeToDesign(panelElement, ctx);
+ panel.writeDesign(panelElement, ctx);
}
public void testAttributes() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java
index 4c0a2863f0..6a34d6584a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestReadDesign.java
@@ -34,7 +34,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private TabSheet sheet;
@@ -68,8 +68,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testSelectedComponent() {
TabSheet tabSheet = new TabSheet();
- tabSheet.synchronizeFromDesign(createFirstTabSelectedDesign(),
- new DesignContext());
+ tabSheet.readDesign(createFirstTabSelectedDesign(), new DesignContext());
assertEquals(tabSheet.getTab(0).getComponent(),
tabSheet.getSelectedTab());
}
@@ -86,7 +85,7 @@ public class TestSynchronizeFromDesign extends TestCase {
tabSheet.addComponent(new Label("tab2"));
DesignContext ctx = new DesignContext();
Element design = createDesign();
- tabSheet.synchronizeFromDesign(design, ctx);
+ tabSheet.readDesign(design, ctx);
return tabSheet;
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java
index c33a1da4d7..a46b33e2d6 100644
--- a/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/tabsheet/TestWriteDesign.java
@@ -33,7 +33,7 @@ import com.vaadin.ui.declarative.DesignContext;
* @since
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private TabSheet sheet;
private Element design;
@@ -43,7 +43,7 @@ public class TestSynchronizeToDesign extends TestCase {
super.setUp();
sheet = createTabSheet();
design = createDesign();
- sheet.synchronizeToDesign(design, createDesignContext());
+ sheet.writeDesign(design, createDesignContext());
}
public void testOnlyOneTab() {
diff --git a/server/tests/src/com/vaadin/tests/server/component/textarea/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java
index 787eac0a03..a31367008a 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textarea/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textarea/TestReadDesign.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private DesignContext ctx;
@Override
@@ -42,7 +42,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testValue() {
Element design = createDesign();
AbstractTextField component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("test value", component.getValue());
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/textarea/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java
index a316b02ddc..01b0095fe9 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textarea/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textarea/TestWriteDesign.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private DesignContext ctx;
@Override
@@ -43,7 +43,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractTextField component = getComponent();
component.setValue("test value");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("test value", design.html());
assertFalse(design.hasAttr("value"));
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TestSynchronizeFromDesign.java b/server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java
index 2df0ab4855..62cb1a53bc 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textfield/TestSynchronizeFromDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/TestReadDesign.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeFromDesign extends TestCase {
+public class TestReadDesign extends TestCase {
private DesignContext ctx;
@Override
@@ -42,7 +42,7 @@ public class TestSynchronizeFromDesign extends TestCase {
public void testValue() {
Element design = createDesign();
AbstractTextField component = getComponent();
- component.synchronizeFromDesign(design, ctx);
+ component.readDesign(design, ctx);
assertEquals("test value", component.getValue());
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/textfield/TestSynchronizeToDesign.java b/server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java
index 58d361e683..479c94f6a8 100644
--- a/server/tests/src/com/vaadin/tests/server/component/textfield/TestSynchronizeToDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/textfield/TestWriteDesign.java
@@ -30,7 +30,7 @@ import com.vaadin.ui.declarative.DesignContext;
*
* @author Vaadin Ltd
*/
-public class TestSynchronizeToDesign extends TestCase {
+public class TestWriteDesign extends TestCase {
private DesignContext ctx;
@Override
@@ -43,7 +43,7 @@ public class TestSynchronizeToDesign extends TestCase {
Element design = createDesign();
AbstractTextField component = getComponent();
component.setValue("test value");
- component.synchronizeToDesign(design, ctx);
+ component.writeDesign(design, ctx);
assertEquals("test value", design.attr("value"));
}