summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2014-12-17 22:35:51 +0200
committerArtur Signell <artur@vaadin.com>2014-12-17 23:08:57 +0200
commit8d7783b4e91928bbc7dd96affdba5eac3e92063d (patch)
tree791c4f41d7491f95a15ffe2bfd4815569da349a2 /server/tests
parent311f5a0a26d78eac19ce07373f37799cbb5e20f0 (diff)
downloadvaadin-framework-8d7783b4e91928bbc7dd96affdba5eac3e92063d.tar.gz
vaadin-framework-8d7783b4e91928bbc7dd96affdba5eac3e92063d.zip
API refactoring (#7749)declarative
Change-Id: I835756b240bc9ece885acdc8f43ec6a1599bb7c5
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/design/TestLocale.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java1
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java6
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java4
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java2
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java2
8 files changed, 11 insertions, 10 deletions
diff --git a/server/tests/src/com/vaadin/tests/design/TestLocale.java b/server/tests/src/com/vaadin/tests/design/TestLocale.java
index 273e611dcf..a4100f7d71 100644
--- a/server/tests/src/com/vaadin/tests/design/TestLocale.java
+++ b/server/tests/src/com/vaadin/tests/design/TestLocale.java
@@ -114,7 +114,7 @@ public class TestLocale extends TestCase {
html.appendChild(doc.createElement("head"));
Element body = doc.createElement("body");
html.appendChild(body);
- dc.storePrefixes(doc);
+ dc.writePackageMappings(doc);
// Append the design under <body> in the html tree. createNode
// creates the entire component hierarchy rooted at the
diff --git a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java
index 5f9674e554..f8af0a992e 100644
--- a/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/absolutelayout/TestReadDesign.java
@@ -78,7 +78,7 @@ public class TestReadDesign extends TestCase {
private AbsoluteLayout createLayout() {
DesignContext ctx = new DesignContext();
Element design = createDesign();
- Component child = ctx.createChild(design);
+ Component child = ctx.readDesign(design);
return (AbsoluteLayout) child;
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java
index 8fe4d9c220..43a050ba80 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractcomponent/TestReadDesign.java
@@ -110,6 +110,7 @@ public class TestReadDesign extends TestCase {
// Synchronize with a design having no immediate attribute -
// explicitImmediate should then be null.
design = createDesign("description", "test-description");
+ component = getComponent();
component.readDesign(design, ctx);
// Synchronize with a design having immediate = false
design = createDesign("immediate", "false");
diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java
index f52a04496a..874fbd83b2 100644
--- a/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/abstractorderedlayout/TestReadDesign.java
@@ -80,7 +80,7 @@ public class TestReadDesign extends TestCase {
String... alignments) {
DesignContext ctx = new DesignContext();
Element design = createDesign(expandRatio, margin, alignments);
- Component child = ctx.createChild(design);
+ Component child = ctx.readDesign(design);
return (VerticalLayout) child;
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java
index 48b228a35a..e194232742 100644
--- a/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/button/TestReadDesign.java
@@ -76,7 +76,7 @@ public class TestReadDesign extends TestCase {
attributes.put("icon-alt", "OK");
attributes.put("click-shortcut", "ctrl-shift-o");
Button button = (Button) ctx
- .createChild(createButtonWithAttributes(attributes));
+ .readDesign(createButtonWithAttributes(attributes));
assertEquals(3, button.getTabIndex());
assertEquals(false, button.isHtmlContentAllowed());
assertEquals("OK", button.getIconAlternateText());
@@ -94,9 +94,9 @@ public class TestReadDesign extends TestCase {
*/
private void createAndTestButtons(String content, String caption) {
Element e1 = createElement("v-button", content, caption);
- Button b1 = (Button) ctx.createChild(e1);
+ Button b1 = (Button) ctx.readDesign(e1);
Element e2 = createElement("v-native-button", content, caption);
- NativeButton b2 = (NativeButton) ctx.createChild(e2);
+ NativeButton b2 = (NativeButton) ctx.readDesign(e2);
if (content != null) {
assertEquals("The button has the wrong text content.", content,
b1.getCaption());
diff --git a/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java
index 529dd911e9..c58b3b6bdd 100644
--- a/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/checkbox/TestReadDesign.java
@@ -43,7 +43,7 @@ public class TestReadDesign extends TestCase {
@Test
public void testChecked() {
Element e = createElement(true);
- CheckBox box = (CheckBox) ctx.createChild(e);
+ CheckBox box = (CheckBox) ctx.readDesign(e);
assertEquals("The checkbox must be checked", Boolean.TRUE,
box.getValue());
}
@@ -51,7 +51,7 @@ public class TestReadDesign extends TestCase {
@Test
public void testUnchecked() {
Element e = createElement(false);
- CheckBox box = (CheckBox) ctx.createChild(e);
+ CheckBox box = (CheckBox) ctx.readDesign(e);
assertEquals("The checkbox must be unchecked", Boolean.FALSE,
box.getValue());
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java
index 51f763bf14..bac3dc70eb 100644
--- a/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/csslayout/TestReadDesign.java
@@ -47,7 +47,7 @@ public class TestReadDesign extends TestCase {
private CssLayout createLayout() {
DesignContext ctx = new DesignContext();
Element design = createDesign();
- Component child = ctx.createChild(design);
+ Component child = ctx.readDesign(design);
return (CssLayout) child;
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java b/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java
index 1a02ed98cc..3e577b5578 100644
--- a/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java
+++ b/server/tests/src/com/vaadin/tests/server/component/label/TestReadDesign.java
@@ -70,7 +70,7 @@ public class TestReadDesign extends TestCase {
*/
private void createAndTestLabel(String content, String caption) {
Element e = createElement("v-label", content, caption);
- Label l = (Label) ctx.createChild(e);
+ Label l = (Label) ctx.readDesign(e);
if (content != null) {
assertEquals("The label has wrong text content.", content,
l.getValue());